Among other things, the 21st century may well be remembered as the age of multitasking. It seems that in order to be recognized as a full-fledged human being, we constantly need to be doing at least two things at a time. We text while we walk, read while we talk, sleep while we commute.
Although it must be quite some task for the brain to do all these things at once (except for sleeping on the train, maybe), grammatically speaking, coordinating two concurring activities is no problem at all. In Japanese the suffix nagara (ながら) does this job, and it does it pretty well.
The basic rule is that nagara is attached to the stem of the verb that is not the main action of the multitask package. So when you watch TV and try to study at the same time, you have to make a commitment, linguistically at least, as to which of the two is more important. Terebi o mi-nagara benkyō suru (テレビを見ながら勉強する) indicates that studying is the main action, to which the TV merely provides the background noise. The reverse combination, Benkyō shi-nagara terebi o miru (勉強しながらテレビを見る), puts the TV set at the center, and the studying becomes secondary at best. I wouldn't recommend either of these combinations but, grammatically speaking, one is just as flawless as the other.