It’s way easier to do it before any other operation than fixing stuff.
Choose a good topic;
Create expressive page titles, and, as much as possible, unique. Make good use of the title tag. Fit your keywords in the title as much as possible. Search engines love that;
Make use of the “description” meta tag. Fill it with ALL your keywords, but don’t over-stuff it;
Use Search Engine Friendly (SEF) URLs to improve the URL structure of your site. Search Engines prefer readable URLs to the unreadable ones filled with parameters and other gibberish;
Find the proper keywords for your site; use your keywords in all the recommended ways;
Work on your site navigation; make it easy and comprehensive; create a good internal structure; create sitemaps and custom 404 pages;
Create and offer quality content;
Always use good anchor text;
Speed up your site! Use gzip compression to deliver your content. Use every declaration just once in your CSS sheets. Reduce the size of the files – omit certain optional tags when coding;
Optimize your use of images;
Use the <heading> tags appropriately; use a balanced mix of headings 1 – 6 on your pages, use at least a heading 1 containing your keyword(s), which will tell the search engines your page is about what you pretend it to be, increase density of the keywords for headings 2 – 6;
Use the “robots.txt” file wisely; allow robots to crawl all the content you need, block them out your backyard and ideally indicate your sitemap.xml location for even better crawling;
Use rel=”nofollow” to avoid reputation leakage for outward links;
Start building quality backlinks;
Make use of the automatic submission services. Let the major – or even the minor search engines find out about your website. You can do it again after massive changes or improvements on your site;
Use the free SEO tools, the free toolbars and the webmasters tools of the 3 main search engines.
Also read the article on measuring the success of your SEO efforts.