SEO is a part of search engine marketing or SEM. SEO is a type of search engine marketing that helps to build your keyword ranking higher in search engines and also generate traffic from them. They help to build and maintain your online reputation.
SEO is the process of optimizing your web site for the purpose of getting free traffic from search engine
SEM is the marketing process with a goal of getting more visibility in search engines either by getting more free traffic or Paid search advertising.
If you are in need of quick results then you can go with SEM. SEM is a paid marketing where you need to pay and promote your website. Next, SEO is slow but steady it is an organic method to bring traffic to your website where you no need to pay money. This is the difference between SEM and SEO.
SEO and SEM both are different ways of online marketing. You can do SEO in the free, but SEM is paid advertising on the Search engine. You can get result instant through SEM. On the other hand, SEO takes time to optimize the site. I would prefer SEO to improve website ranking.