Crawlers retrieve web pages and indexing software generates indexes of keywords and their locations. These indexes and pages are stored in databases for search engines to search through. Search engines allow users to input queries and return relevant results by matching queries to information in indexes and databases.