There are two things that determine our ranking:

the site or pages themselves (our content, how well it’s optimized, the age of the site, etc.), and our
“Total Backlink Value”. This is a term for the number of backlinks, times the strength of each backlink.
Search engine ranking is largely about backlinks. A backlink is simply a link somewhere else, pointing to our site.

All backlinks are not equal. The ‘value’ of a backlink is determined by where it is (the ‘strength’ of the page it appears on, the position it appears i.e. in website content vs. elsewhere such as a blogroll, etc.), age or ‘freshness’ of the links, the rate at which they are created (“link velocity”), and other factors. One very strong backlink can be worth more than dozens, even hundreds of ‘weak’ backlinks.
Anchor text – the ‘clickable’ text of a link – serves to ‘focus’ it’s value. It doesn’t necessarily increase the value of the backlink, but serves to focus its strength to that specific keyword, rather than dilute its value across the page it points to (we’ll talk more about keywords shortly). As such, we still get value from ‘bare’ backlinks, but if we’re trying to rank for a particular keyword, using that keyword as our anchor text boosts our ‘strength’ for those particular keywords. It also says to Google, “this is what that page is about”.

Google Update Note: Google seems to be giving “partial phrase anchor text” more weight. “Partial phrase” essentially means anchor text that includes only part of, or variations of, the targeted keyword as the clickable text. As a result, we would want to mix in a higher percentage of links using anchor text such as “dog training” and “best training.”
If we were able to total up the value of all our IBL’s (“In-Bound Links”), and all other things were equal – two identical sites – the one with the highest “Total Backlink Value” will rank first, second highest will rank second, etc. Similarly, for a particular search, the one with more relevant anchor text links will rank first since its overall strength is ‘tipped’ in favour of that search term.