The term "Search Engine Optimization" refers to the process of making your website as highly ranked as possible for search terms that are important to you. For example, if your website is for a coffee-selling business, you might decide that you want your website to be among the top search results when someone searches for "coffee beans". The business of search engines is to return relevant results for what people are searching for, and as such they must calculate how relevant a website is in relation to search terms used.
Whether or not your website is returned as a search result for a specific search term will depend on whether the search engine in question knows what your website is about. Search engine "spiders" are automated programs that surf the internet collecting data about website pages in order to categorize the content of each and every page. Your website needs to accommodate these spiders so that they can easily collect data about it, and this is where SEO first comes into play. A good SEO service will make changes to your website so that each web page is both welcoming to search engine spiders and provides all of the information they need to decide what your web pages are actually about.
Assuming that your website has been optimized for search engine spiders to collect data about your website, then your website will be returned as a search result when someone searches for something related to the content of your website. The rank that your website achieves in these search results will depend on each search engine, but generally they decide what rank your website will achieve using the same considerations. Firstly, search engines will determine just how relevant your web pages are to the search query. A good SEO service will make sure that your web pages communicate as effectively as possible what each web page is about.
Secondly, they will decide how important your page is - for example, if you post a review of the presidential debate on your blog, will search engines consider this to be more relevant to someone searching for such content than a review of the debate on a network news website? In this example, clearly the network news website will win. This is because they are considered to be an authority on the subject. Furthermore, if your website is new and no other websites link to it, it's likely that your website will not rank very highly at all.
Now consider if your review of the debate was particularly insightful, and several other bloggers link to it in their own review. In this scenario, search engines will know that the pages linking to you are of the same subject and will rank your website higher as a result. Now consider if a column on the network news website also links to your review of the debate: A web page that not only belongs to an authority on the subject is now linking to yours, but it also contains related content. In this scenario it would be likely for your website to be returned amongst the higher rankings for searches related to the presidential debate. This is where SEO next comes into play. A good SEO service will identify websites that are both relevant to your website and are highly ranking for search terms that are important to you, and will work on generating links from such websites to your own.