Search Engines have crawlers which gather information and content from websites on the internet, these crawlers make Search Engines index the collected information in relevance to many algorithms which find a way to match between your query and the data you are searching for.