The doctrine of cabinet collective responsibility is part of the British constitution1. It is there by convention, rather than by law.
The idea behind cabinet collective responsibility is that cabinet ministers represent in public (which, in practice, means represent to the media) a decision or policy which has been made by the entire cabinet. As such, the individual minister is now a spokesman for government policy. Therefore, even if a minister finds that the policy clashes with his or her conscience, he or she should refrain from criticising it. If this is not possible, it is the minister's duty to resign2.
This seems harsh, but it is based upon the idea that a minister is a member of the government (obvious, I know). Therefore, the minister has to support the government. Once a decision has been made, the cabinet members have a responsibility to uphold that decision, and any dissent should be private. It is a sound idea and, I think, a necessary one, to avoid policy decisions becoming slanging matches in the press.
The interesting thing about cabinet collective responsibility is that it seems to have neither precedent nor real examples (though if anyone could /msg me one...). The classic example given is that of the resignation of Lord Michael Heseltine over the Westland Affair. This was in 1986. Westland Helicopters was failing and there were American and European companies bidding to take over the company. The view of Margaret Thatcher and some of the then cabinet was that the American company should take over; Heseltine disagreed and so resigned. However, later speculation was that he resigned in order to challenge Thatcher's leadership (he did stand against her in the leadership contest of 1990). Therefore, Heseltine is not really an example of cabinet collective responsibility at work. Similarly, Geoffrey Howe resigned under this doctrine in 1990, claiming he could no longer support the government's policy on Europe. However, it later became clear that he resigned so that there would be a serious leadership contest in 1990.
See also: Individual ministerial responsibility.
Cheers to Catchpole for pointing out that the Westland affair was, in fact, in 1986. What would I do without lovely people who /msg me and correct my mistakes?
1 Yes, we do have one. It's just not codified.
2 "Resign", in this case, means resign from the government (also known as the front bench or cabinet), not resign from Parliament. If the constituents have chosen their MP, they have chosen their MP, and the MP's opinion of government policy is irrelevant. One does not cease to be an MP simply because one has resigned from the cabinet; Peter Mandelson is a case in point. Ahem. Twice.