The irreplaceable Overcoming Bias have an excellent post on every blogger's favorite psychology paper, Kruger and Dunning (1999) "Unskilled and Unaware Of It".
Most people (myself included) have taken this paper as evidence that the better you are at something, the better you are at knowing how good you are at it. Thus, people who are bad don't know that they are, which is why they don't try to improve. It's an appealing conclusion, and also a very intuitive one.
In general, these kind of conclusions should be taken with a pinch of salt.
Indeed, it turns out that there's another more recent paper, Burson et. al. (2006) "Skilled or Unskilled, but Still Unaware of It", which finds that everyone is pretty bad at judging their own skill, and in some circumstances, more skilled people make less accurate judgments than novices. Heh.