HubSpot interview question

How do search engines work?