Cognitive Behavioral Therapy (CBT) is a type of psychotherapy that helps to identify and change destructive or disturbing thought patterns that have a negative influence on behavior and emotions.
The theory of CBT is that your thoughts effect your feelings, that effect your behaviors, that effect your thoughts and the cycle continues. If you have negative thoughts, you'll likely have negative feelings, and unhealthy behaviors. CBT focuses on learning new patterns of thinking that are more realistic, objective, and positive. This will then have a positive effect on your feelings and behaviors.
For example: If a woman thinks "I'm a bad mom." That person may have feelings of sadness, disappointment, and shame. That person then might start shutting down and not interacting with their child. Then the relationship between that person and their child may start to suffer and then the thought "I'm a bad mom" is validated to them and then the negative cycle continues.
CBT will help a person who thinks "I'm a bad mom" think for instance, "My child is not sleeping well, but that does not make me a bad mom, and we will figure it out." That person will then have feelings of hope and strength. That person may then try different things to help their child with more consistent sleep. The child then starts sleeping better and the thought "I'm not a bad mom" is then strengthened and validated, the relationship between mom and child improves. The positive cycle continues.