Confidence in sport can be thought of as one's belief that they can do whatever it takes to be successful in their sport. Confident athletes think they can, and they do. They never give up. These athletes typically use positive self-talk, and imagery to boost their confidence.
Athletes who perform to the best of their abilities are self-confident. Their confidence has been developed from the way they think and from previous experience of being successful on a regular basis. How we think and talk to ourselves in practice and competition is critical to our performance.
Our minds must be trained to work for us rather than against us, the same as we have trained out bodies physically for performance. Some of you might be conscious of the thoughts you have and how you speak to yourself. Others might not even be aware of this internal "chat" we have with ourselves. Regardless, the way we think directly affects how we feel and how we act/behave. If we think negatively then we will perform poorly. If we think appropriate and realistic thoughts, or positive thoughts, good performance is possible/likely.
The Sport-Confidence Model by Vealey, Hayashi, Garner-Holman, and Giacobbi (1998) proposed confidence comes from nine sources, including mastering a task, preparing well physically and mentally, having social support, having coaches' leadership, and getting the rub of the green in your surroundings. Therefore, you can gain confidence from knowing others are there supporting you, either in spirit, or ringing those cowbells on the course, you can gain confidence from knowing that you have mastered this race distance so you can do it again, you can be confident because your training has gone well, and also, you know this course, you know the surroundings, so you're more confident because you feel at ease.
Developing and maintaining confidence though does mean gaining awareness of the negative and dysfunctional thoughts you have that have been developed over the years. You then need to learn to deliberately take a step away from them. Once you have done this you can use self-talk to be positive, encouraging, and self-motivating towards yourself, for instance, "I can do this!" "Keep going!" Alternatively, you can challenge the unhelpful thoughts and replace them with more rational and realistic thoughts, for example, rather than thinking "Everyone is laughing at me running because I am overweight", you might think "We all have to start somewhere", or "There are always all shapes and sizes running at my local parkrun."
Mistakes and errors will always happen in sport. However, don't focus on these. Instead, you can build your confidence by selectively attending to whatever small improvements and positive experiences have occurred, such as running the whole way up the hill rather than walk-running it, or finishing strongly even if you went off too fast at the beginning. When you have made a mistake then look at it in a constructive way to learn from the lesson, as all mistakes are lessons to be learned.
Williams, J., Zinsser, N., & Bunker, L. (2015). Cognitive techniques for building confidence and enhancing performance. In. J. M. Williams & V. Krane (Eds.). Applied Sport Psychology: Personal Growth to Peak Performance (7th ed.) (pp. 274-303).