When you feel more competent than you actually are, you are overconfident.
When you doubt your skills despite their superiorities, you lack confidence.
Confidence doesn't automatically bring up competence, and vice versa. One may be competent without being confident. One may be confident without being competent.
Just as it is difficult for most to acknowledge their weaknesses, it is also difficult for some to acknowledge their competence.