Also, you need to understand all the Pokemon and which purpose they serve in the team, like if it's a defensive wall, offensive sweeper etc. Then there's also teams that have a theme to them, like those based around weather conditions, examples include Sun-based teams being mainly Fire and Grass-types, Rain teams being Water-types, Sandstorm teams being Rock/Ground/Steel dominant and so on.
^That sums a lot of what you'll need to know.
You'll also need to learn how to predict. Per say, you have your Salamence against a Ferrothorn. You have Fire Blast, but you have to think- what if your foe switches out with Heatran? That'll boost Heatran's Fire type attacks. Then, he HP Ice's Salemance and sweeps the rest with Fire Blast.
What if you have a Politoed and your foe has Thundurus? Thunder seems pretty expectable from Thunderus, but he may expect for you to switch out with another Pokemon- so he decided to use Focus Blast. You can worry if he's going for the weakness of your Politoed, or if he's going for the weakness of the Chansey he expects for you to send out.
It's a very "complicated" subject, but it's fun! Once you get the swing of things, you'll love it!