The most important factor is relevance of the links for the keyword you're trying to rank for. Examples:
All backlinks have 'golf swing' in the anchor text , and the keyword you're trying to rank for is 'dog food'. In this case, even if you do on-page SEO for 'dog food', it won't help, you'll still rank low for 'dog food'.
On the other hand, if all backlinks have 'dog food' in the anchor text, you'll rank higher based on the authority of the source of these links, i.e. what pages they appear on.
So, in summary: (a) get your anchor text right and of course your URL also, and (b) get a back link from a page that already has high authority for the keyword you're trying to rank for.