Cognitive Behavioural Therapy is a focussed counselling method aimed at rapidly dealing with personal issues of all kinds.
"Doctor, doctor, I can't sleep." "Why don't you try counting sheep." This is cognitive therapy, probably trying to distract a person away from thoughts that are keeping them awake. I.e. working with people's thoughts or cognitions.
"Doctor, doctor, I can't sleep." "Why don't you go for a walk or have a warm glass of milk before bed." This is behavioural therapy, getting the person to do something, in this case a walk or milk might have a calming effect.
These are fairly simple examples of a the wide range of changes that a CBT therapist might work with you on. In general thoughts feed our emotions so that "Gee I must be stupid." tends to make us feel bad. A CBT therapist will help you discover your problematical thoughts. Sometimes this insight can be enough, but more usually problematical thoughts which keep coming back and causing emotional disturbance are looked at critically. "Is it true?" We often believe our self critical thoughts absolutely but they may be only partially true. Even true thoughts can be unhelpful ... "Yes it's true that you were left 10 years ago and had to bring the children up on your own, but is it helpful to think this thought a dozen times a day?"
Other interventions such as thought stopping for particularly problematical thoughts and breathing or relaxation exercises are used.