1. Get the information (crawl the web)
2. Store the information (Index)
3. Serve the information
1st step - you crawl the web to get the latest information of all new/updated/deleted sites. Collect all the latest information (this would be a frequent & periodic process for a company which offers search results)
2nd step - Now you have all the information. You need to create index to save this so that you can efficiently and effectively retrieve when required (similar to an index for a large document). You could rank the sites in the order of relevance under a list of parameters that you decide.
3rd step - Match the incoming query to the index & site ranking created by you, and now you have the search results ready !!