"hacking" really just means finding alternative methods of doing something not intended by it's designers.
"cracking" is what you're referring to. That's when you're gaining unauthorized entry, etc. etc.
The best security courses teach you how to break things so you know how to prevent others from doing it.