It is a combination of things but ultimately it comes down to one thing - traffic. So how do you optimize to have the best chance for positive traffic. It is a combination of readable text on the pages for google to spider, links coming in and out of your site from other busy sites, proper page titles (h1 and h2), targeted meta tags, good coding overall with no broken links or open ended coding strings, etc etc etc. All of it adds up to a site that is optimized positively and has the potential for success. Once all of this is done the really hard stuff begins with PROMOTING and marketing your site to gain the traffic.