Both. After you have picked up the basics you should start some light sparring. As long as you got some good sparring partners at your gym especially if you're a beginner you will learn all sorts of things. Just make sure when you first start sparring you match up with guys who want to learn or are willing to help, because every now and then you get a new guy who just wants to fire away, and it makes it hard for a beginner to learn.
Learn proper form and technique from a good coach and practical application from training with other guys in the gym, light sparring and pad work is great.
Honestly, I started with TKD as a kid then trained Muay Thai for the last 4-5 yrs. If I had to do it all over again, I would have started by learning traditional boxing at a good boxing gym, then MT or kickboxing. Just my opinion, but traditional boxing really teaches the most important part of standup: defense, foot work and proper punching. It is a relatively cheap sport to learn, the gym fees are far less than most MMA gyms. Good luck!