When we talking about Search Engines,We mostly concentrate on big search engines like Google,Bing,Yahoo,MSN etc. because each days million of people searching through them.
Ever wonder how the search engines brings the relevant results from the billions of the web pages in a fraction of seconds.?
And how do they knew about the new websites which appears on the web recently?
Actually what happens : Whenever we enter a search query or search keyword in the search box of a search engine like Google or Bing the Search engine brings the results from the content which are present in their indexes,that is the reason why the new websites or blogs not comes immediately in search results when they are launched. They do come after the search engine have index that website content.
According to a famous Google Engineer the indexing of web pages by search engines is done by the software programs called spiders/bots the spiders start by fetching few web pages then they follow the links on those pages and fetch the pages they point to and again follow links on those pages and fetch the pages they linked to and so on.Until they index a pretty big chunk of the web,many billions of pages stored across thousands of machine.
So whenever a query is performed ,bots searches the index and their may be hundreds of thousands of possible results.But among billions of results Google decides which few pages are really wanted by user by seeing that the:Whether search keyword is in the URL,Title of the page ,how many does this page contain your keyword ,is this page is listed in directory,does the page contains synonyms for those words?, is the page from a quality website or low quality or even spamming.
And most what is the page rank of that page ?The page rank algorithm formulated by Google founders Sergey Brin and Larry page which rates the web page importance by looking how many outside links points to it and how much important those links are(links from high quality website are better than that of low rank)?
Finally after combining all those factors together to produce each page overall score and sent us the search results.
Google never take payments for indexing a website into search results or to make a website to appear on top in organic search.
Rather when we see the search results there are ads on the right sidebar etc. Google take payments only for those.Google AdWords comes into role when we deal with the paid advertising with the Google.