1) Search engines work by using software programs called spiders or crawlers to collect information from websites and build indexes of keywords found on pages.
2) The indexes are then used by search algorithms to match queries entered by users and return relevant results.
3) The main components of a search engine are the spider that crawls and collects data, the indexer that builds indexes from the collected data, and the search software that processes queries against the indexes.