Both sea and seo are about facilitating findability for your potential internet visitors. findability is one of the barriers on the internet. You must let search engines know that you exist and what your site is about.
Before starting a website you should understand about search eninges. They are businesses too, with goals and customers. Their customers want one thing: good quality search results.
We, website owners are not their customers, but their "raw material" suppliers, we supply websites with content.
Search engines analize this raw material and runs automated processes on this which draws conclusions. It draws conclusions on the content, importance etc.
Then when someone searches, an other part of the search engine will do a search and based on the results and the search engiine conclusions the website is shown in the list or not, and on what position, and with what description.
Now, as the position in a result list of a search engine(the pagerank) is important, some people offer fake raw material to hunt for the highest page rank. They fake content for keywords, create fake content for search engines, buy links etc. A constant war is going on between the searchengines and the pagerankhunters.
And this is where seo comes in. It's the part of setting up a website for the best findability possible, eg the highest pagerrank on desired keywords, while conforming to search engine rules.
So, instead of writing for customers, website owners have to write also for the search engines, website programmers have to apply specific structures, webmasters have to take care when registring or switching domain names etc.
Not everybody can be on the first page of a certain searchterm. and there is where sem comes in. Sem, or search engine marketing is about paying to be seen. You can create an advertisement tekst that combined with a keyword and the page it link to is good enough to be shown on the first page of a result list in google. But it is paid, and the value is part of the ranking formula. This way every body can have his fifteen minutes of fame on a google page.
So SEMis a short term action, it can be seen as a campaign, while seo is really a long term investment ito your web configuration, programming, but also your contentwriting and even external relationships.