The Dunning-Kruger effect is a cognitive bias in which "people reach erroneous conclusions and make unfortunate choices but their incompetence robs them of the metacognitive ability to realize it."
The unskilled therefore suffer from illusory superiority, rating their own ability as above average, much higher than in actuality; by contrast the highly skilled underrate their abilities, suffering from illusory inferiority.
This leads to a perverse result where less competent people will rate their own ability higher than more competent people.
It also explains why actual competence may weaken self-confidence because competent individual falsely assumes that others have an equivalent understanding.
"This, the miscalculation of the incompetent stems from am an error about the self, whereas the miscalibration of the highly competent stems from the error about others.
- David Dunning and Justin Kruger, 1999.