Many parameters. Google was different once in a search terms and they had later updated their algorithm based on their analytics, stats, researches and customer (Advertisers') feedback. Few of them revealed (Google Panda and Penguin updates etc.) and few of them not.
In general, advance or on-time writing about a topic / keyword, mass search sooner or later, less competition and non-black listed website can rank the best.