It is not about denying thoughts. It is not about telling yourself that you are happy, when you are not.
It can't treat severe depressions, but it can treat mild ones, and it can lower the amount of medication needed to treat severe ones.
You can think about it as "good posture for your mind". Nobody wants a bad posture, but lots of people have it, and some have it so bad, that they get pains so severe they cannot work. Some people with back pain take pain medication, and never solve the problem, but can go on with their lives.
For some people, there are external influences on their posture that cannot be negated by exercise and they do need to change their environment.
Some do need an operation with everything that entails, but most just need to fix their posture: Do the right exercises and stretches and they won't need medication or operations.
If you are depressed because of your abusive boyfriend, then CBT's answer is not "stop thinking about it" or "just think happy thoughts when you're being beaten" it is "get the fuck out of it".