Companies like Yahoo! and Google have developed software which crawls the internet for new websites and catalogs that information.
These search engines, as they are called, look for keywords and other information contained inside webpages that they discover. These keywords are stored in metadata tags, a special section of a webpage.
The resulting catalog is very similiar to a phone book, but because of metadata tags, it contains much more than a ordinary phonebook.