Confidence is a knowledgeable understanding of what is going on!
Confidence is the acknowledgment of knowledge. The understanding of the subject matter. You cannot have confidence unless you KNOW what it is all about as to the instance you are focusing upon.
If you lack confidence in a specific thing it simply means you do not have the understanding or knowledge about the subject in question. To attain that knowledge leads to confidence and therefore you are then able to accomplish it. This also is connected to BELIEF which also has a part to play in confidence.
If you believe in something then you will be confident in it.