Search Engine Optimisation is defined as the process of building pages in a manner which enables the pages to rank highly in 'algorithmically' determined search results, which are generally displayed on the left hand side of the page. The 'algorithmic' results are independently determined by the search engine's own mathematical algorithm, and are based on relevance to the search phrase. Search engine marketing refers to the short text advertisements which generally appear at the top or down the right hand side of search engine results. These are often labelled as "sponsored Links" or "sponsored results".
I think the backlinks from social networks( facebook, twitter,etc)are also one part of SEO,because SEO has inner SEO and outer SEO. It is hard to divide.
search engine optimization is the process of improving the visibility of a website or a web page in search engine.SEM means search engine marketing.