SEO and SEM are both parts of digital marketing.
SEO or search engine optimisation is organic or unpaid form of marketing, where search engine ranks you on result page on the basis of your content. This is done by organic crawling through your webpage by the search engine.
SEM or search engine marketing is however a paid form of digital marketing wherein you pay the search engines fro positioning your website at the top or most viewed locations of the search engine result page.