Yes, you can get in legal trouble if you hurt someone and it becomes known you have studied a martial art. Advice for the average person who wants to learn some self defense and get in shape. Do not train under someone who encourages trying out the martial art in street brawls. Example of a bad instructor is the guy in the movie Karate Kid, who instructed the "Cobra Kai" dojo. Stay away from "chain store" dojos that require contracts. Check out local universities' continuing education programs, or the Y.M.C.A.
Beginner training usually is very intense to weed out anyone there who wants to learn a martial art for nefarious purposes. Think of getting a black belt in no less than 4 years, about like a college degree. Like everything, you get out what you put in. Best to go at your own pace, far as advancing. I usually waited for my instructor to indicate when I was ready for a test.
Couple stories:
One of the women who was training with our group woke up one night with a would-be rapist holding a knife to her throat. She had been training about six months. She said to herself, "This isn't going to happen to me," and with that pushed the guy off her and literally kicked him out the window he came in.
A guy who had been training about six months pulled over to help out what he thought was a stranded motorist. He was attacked with a chain and successfully defended himself. Another guy, a green belt (about 9 months training) was driving and motioned over by a trucker...road rage incident I suppose. The trucker came up to swing and the green belt knocked him out.
Karate works through the element of surprise. It's not intended as a sustained action, in other words, stun and run for non-fighters. Some of the guys in our class who were already street fighters began Karate to learn self control. It mellowed them out. They didn't need a martial art for self defense.
Les