Derek Miller writes many interesting items at Penmachine.com. His post about how one article ranks well in Google is a great read. This is just one small excerpt.
What it comes down to is, (a) I wrote the best article I could, and (b) I let people on the Web know about it, and in letting people know I tweaked the article a bit so it included most of the words they might be looking for. If the article sucked, it wouldn’t get linked to, and it wouldn’t show up high in Google rankings for any search in particular, no matter what other effort I put into it.