To give a very simplistic view of link building, if Google sees two web pages that have been equally optimised for a particular keyword, then it will look at the backlinks to determine which one to rank higher. There’s only so much you can do in terms of on-page optimisation. Once you have your keyword in your title, your url, tags, sprinkled throughout your text, perhaps in image tags and so on, at that point anything else that you do to the page itself will have minimal impact and it all falls down to backlinks.
You can get a little bit too simplistic and think that it is just about the number of links but that is not so. There are many factors that determine how valuable a particular backlink is, for example:
* Whether or not it has the “no-follow” tag
* The PageRank of the linking page
* The anchor text used in the link
* The relevancy of the linking page to the target page