Search engines work by using crawlers to build an index of web pages which is stored in a database, allowing users to search for keywords to retrieve relevant information from the index. The index enables fast searching across websites and collects data from pages to build the database. Search engines function to retrieve internet information and come in different types like robot, directory, and meta search engines.