I will give you the basics of how search engines find web pages, What they do with pages they find and how they decide, what results to show? 

When you're using a search engine to defined the closest coffee shop, you are probably not thinking about search engine technology but later you might wonder, how did it do that? how did it sort through the entire internet so quickly and choose the results you saw on the page. Search engines each use their own software programs. But the way that work is pretty similar, they all perform three tasks:

1. They examine content, they learn about and have permission to see. that's called crawling
2. They categorize each piece of content that's called indexing
3. They decide which content is most useful to searchers that's called ranking

Let's take a closer look at how these work? 
Search engine crawl the internet to discover content like web pages, images and videos. Each search engine uses computer programs called 'bots' or 'robots'. Crawlers or spiders to make their way through the pages. The bots walk from page to page by following links to other pages, These bots never stops. Their sole purpose is to visit and revisit pages looking for new links and new content to include in the index.

Indexing is the second part of process. The index is a giagantic list of all the web pages and content found by the bots. The search engine uses the index as the source of information displayed on the search results pages. 

How search Engine actually works?

1. Crawling bots
2. Indexing
3. Ranking
4. Results