Read. Read lots. SEO is a science, albeit not an exact one. A lot of very smart people have a lot of opinions on the best way to optimize a website for search engines. Not all of the opinions are good, however. The best thing you can do is try to take in as much information as possible--but all with a grain of salt--and then form your own approach based on your own opinions and your experiences.
SEOmoz is a great place to start. Grab the cheat sheet, read their articles (especially in the Technical Issues category) and use their tools.
Google's Webmaster Central is also invaluable, together with its and his YouTube channel. Make sure to follow Matt Cutts' blog and Twitter (though he's currently not tweeting) as well (he's they guy in most of the videos).
Other good sites include Search Engine Land, and its SearchCap--a daily recap of lots of interesting search engine news. Marketing Pilgrim is another good site, although it's more about search engine marketing in general and not specifically about SEO.
Then, experiment. Create sites (note: plural) where you can employ various techniques and see the results first-hand. You can even monetize your sites with AdSense or other means to get more than just knowledge out of it.
It's also worth noting that a lot of SEO are attributed to content. Search engines love blogs and press releases, as they provide dynamic content that they can index. Press releases are great because they normally generate backlinks when other sites pick them up (and edit, which prevents duplicate content for you!). Blog posts can do the same if they get noticed by other blogs.
After all, there's only so much you can do with code.
The most valuable tip I can give you, however, is to stay away from blackhat SEO. It may be tempting, but it's not worth it. It may be easy, but it's not worth it. If you get caught, you're finished. Play fair and the search engines will respond in kind.
Other than that; ask more specific questions. "How can I increase SEO" is very general and vague, and you're not going to get very good answers. "Do you think technique X is worthwhile?" or "Which is better, Y or Z?" are examples of questions that are easier to address.