SEO
You search engine optimize your website to draw traffic from various search engines for your chosen keywords and key expressions. The search engines use their individual algorithms to evaluate the rankings of your website for various keywords and key expressions. Although they use their own logic to decide for what keywords you should rank well, you can play an active part in it; for example you can arrange content on your website in such a manner that it aptly conveys to the search engine crawlers for what keywords and expressions your website or individual web pages should be ranked higher.
Having tons of relevant content around the theme of your website too makes a huge difference: the more relevant content you have the better search-engine-optimized your website is. The search engines must get the impression -- a legitimate impression -- that your website contains valuable content and it should be presented to search engine users. Another benefit of publishing lots of high-value content on your website is that other Webmasters link to your website at their own discretion and this reaffirms the value of your content in the logic of the search engine rankings algorithms.
The way you arrange your content on your website is called on-site optimization and the way you encourage others to link back to your website is called off-site optimization. Both kinds of optimization move parallel to each other during your search engine optimization campaign and neither can be neglected. Search engine optimization doesn't cost much if you decide to do it on your own because it basically results in generating lots of traffic from the search engines.
Once your website has been optimized for your chosen keywords it doesn't matter if you get just one click from the search engine result pages or you get millions of clicks; the only cost is the optimization cost. Search engine optimization takes lots of effort and even time so you need to be very patient by implementing your search engine optimization strategy.
Online marketing
Online marketing onthe other hand takes less of your effort but it is more expensive because sometimes you pay for every click and for every impression. For online marketing most of the time you require a significant monetary budget because you have to promote your website on various websites and portals, and even search engines, for every kind of exposure you have to pay repeatedly.
Online marketing involves campaigns like pay-per-click (Adwords for instance) programs, pay-per-impression, sponsored links, banner advertising, and e-mail campaigns.
To do online marketing you neither have to optimize your website nor have to generate relevant content, although you must have compelling copy so that the money that you are paying for the traffic isn't wasted.Both SEO and online marketing have their pros and cons and they both can be used in conjunction with each other to get the highest amount of relevant traffic from the search engines and from other websites.