The main difference is that Search Engine Optimization (SEO) focuses on optimizing a website to get traffic from organic search results. On the other hand, Search Engine Marketing (SEM) aims to get traffic and visibility from organic and paid searches.