The reality is that the vast majority of them just follow party orders. This data from The Public Whip, taken by us in June 2013, shows the number of times an MP voted against the majority in his own party.
A senior MP was reported saying "‘Voters may not like it but if you pay peanuts you get monkeys." The graphs below show that inspite of their basic £65k salaries, not including all the perks and privileges and being allowed to have multiple other paid jobs, we don't even get monkeys - we get obedient sheep.
[For those less mathematically minded, if an MP voted against his party 2% (2 out of 100) of the time, that means he marches in line with his own flock 98 times in 100].
(It is usual that MPs in the party in power tend to rebel more than those in opposition - because they know their rebellion won't make any difference).