SEO focuses on optimizing websites to improve organic search engine rankings, while SEM encompasses both organic (SEO) and paid (PPC) search strategies to increase visibility in search results.