You might think of a search engine as a website you visit to type (or speak) a question into a box and Google, Yahoo!, Bing, or whatever search engine you're using magically replies with a long list of links to webpages that could potentially answer your question.
That's true. But have you ever stopped to consider what's behind those magical lists of links?
Here's how it works: Google (or any search engine you're using) has a crawler that goes out and gathers information about all the content they can find on the Internet. The crawlers bring all those 1s and 0s back to the search engine to build an index. That index is then fed through an algorithm that tries to match all that data with your query.