Google, Yahoo!, and MSN perform four basic tasks. These are as follows:
Search engines use programs called bots or spiders to 'crawl' the World Wide Web, looking for pages.
When a bot or spider finds and crawls a page, it can then store it in the search engine's database. This is called indexing. The search engine's index contains all of the pages and documents the spiders or bots have crawled.
Search engines process queries. For instance, when you go to Google and type 'affordable camping gear' into the search box, Google processes your query and returns you results based on what you are looking for. Hundreds of millions of these queries take place every day.
The final function of a search engine is to rank results. When you type in a query like the above, the search engine quickly runs a sorting equation to see which results it feels are most relevant to your query. This sorting equation is called an algorithm, and each search engine has a different algorithm. In other words, they have different priorities regarding what web pages they think are the best match for what the query is. They perform this huge task of picking the best results in seconds, and SEO is all about creating pages that the search engines find to be the best, most relevant matches for important queries.