If you really want to gain the most from watching Chinese TV, you'll have to put in a little work. These tips will help you turn an otherwise frivolous activity into something useful.
Take notes (做笔记). This may sound really nerdy, but taking notes while you watch TV is a small price to pay on the road to Chinese fluency. So grab a pen and paper, and with each episode or program that you watch online, pause and write down words that are new and useful. This should be easy if the program comes with Chinese subtitles, as some of them do. Learn the words, and observe the context in which they are being used.
Re-watch. Another way to enhance your learning is to watch the episode, or part of it, again. But the second time, watch without the English subtitles, if you had them on the first time. Do this a few days after you first watch the episode, so that the scenes aren't that fresh in your mind, and see if you can understand it just as well without any aid.
Watch with Chinese subtitles (字幕). Intermediate and advanced learners should really try this challenge. Watching with Chinese subtitles will help you pick up the correct pronunciation and, more importantly, enhance your ability to make intelligent guesses based on context. You can check the actual meaning after that, just to be sure.
Pick up the accents (方言). Depending on your motivation for learning Chinese, accents could play a significant role. If you are heading to Taiwan, for example, it would make much more sense to watch Taiwanese productions since their accents are rather different than that of Beijing Chinese. Learning to mimic accents, and listening to yourself speak aloud, will actually help you sound like a real pro and be understood.