What you are asking is called "Search Engine Optimsation" (SEO) and there are hundreds of articles and books (ebooks) written on this and still no one can claim that I am the master of this trade.
There are various thing that you need to do. Start with a w3c standard compliant code. It may not always be possible to write a 100% compliant code, but try to keep the warnings to minimum. Stop using frames, tables, etc. for web-pages. These are only the very basic things. There are a lot of other things. Take a search at google