The best description of how a search engine finds matching web pages when a user types a search like "U.S. presidents" is:
The engine examines an index (automatically pre-built) that relates words to web pages.
Search engines create and maintain an index that organizes and stores information about web pages, allowing them to quickly retrieve relevant results based on search queries.