"Taking it out on" someone means yelling or getting angry at a person, even though they're not really what's made you angry. For example, if you have a bad day at work, and then come home and yell at your aunt, you're "taking it out on" your aunt.
So what is "it" exactly? "It" refers to your anger or stress:
When you don't deal with stress properly, you can end up taking your anger out on those around you.