Most people couldn't care less what lies behind the search box. But if you personally are curious about the way these work, consider three kinds of database, which run the vast majority of these searches. The small sites may have what's called a flat-file database , which is like your address book. Every record has the same slots to fill in, like a form. There is only one file, and, usually, that file does not contain many records.
Bigger sites use a relational database , which has different tables for different information.
So there's a table for product descriptions, and another for the manufacturers' addresses. The information from each table is put together on the fly and served up to you on the screen as a single page, or part of a page. The advantage to the company is that they have to update information such as the company address only once, because it lives in only one table. The relational advantage is that with a lot of products you get quick responses. Examples include airline reservation systems and online stockbroker systems.