This is not simple, as keyboard said. So you'd want to look into tutorials for building a search engine. But I don't know that you really want to do that.
This would be simpler if it's only on your own website (if this is a website-internal search). If you want it to search the web, it will, effectively, really mean building a search engine. The basic idea is as folllows:
1. Browse the whole web (or whatever you care about) and store a copy in a local database (removing extra irrelevant data like HTML code).
2. When a search is performed, it is performed on that stored copy.
Bookmarks