Search engines have three main functions: crawling to discover content by sending bots to visit websites and follow links, indexing to track and store the content by logging details about each page, and retrieval to return relevant pages when a user searches by checking queries against the indexed content. Crawling acquires data about websites, indexing processes the crawled data by creating a list of details about each page, and retrieval ranks and returns the most relevant pages for a user's search query.