The goal of CBT is two parts. Part one (cognitive) is to recognize cognitive distortions, correct them by attempting to validate them(if its a cognitive distortion, the validation always fails), then make a more balanced thought. The person with anxiety or depression usually only sees the negative possible outcome or reason for a situation, when in fact there are usually neutral and positive explanations as well.
The second part (behavioral) is exposure therapy, controlled exposure to anxiety provoking situations. Since the human body CANNOT maintain a constant level of high anxiety, the person in the anxiety provoking situation has his or her anxiety levels drop. Even a slight drop 10-20% is good. The exposure is continued till the patient either reaches a significant drop in anxiety in that situation or when the anxiety has ceased all together.
During exposures, the patient uses the cognitive strategies to help battle their anxious thoughts they are experiencing in the exposure setting.