The point of attacking an opposition team’s gym is to either lower it’s level, or defeat it completely so you can take it over. This will often mean attacking several different types of Pokemon ‘types’. You can make things a lot easier for yourself by knowing what you’re attacking, and choosing your own Pokemon accordingly.
I originally thought that this was based on Type alone, but I’ve since found that it’s not.
Example: You are attacking a Flareon (Fire-type) with a Golduck (water-type). This is generally good, as water puts out fire, but if your Golduck doesn’t use a water-type attack, then it’s still useless. I’ve found that my best Golduck uses a Psychic attack, which is why he wasn’t as effective as I thought he’d be.
How do you know if what you’re attacking is effective or not? You will get messages on your screen. If the message “Super effective” comes up over the defending Pokemon, then you are doing well. If the message “Not very effective” comes up, then you are dong badly.
Conversely, if the message “Super effective” comes up over your own Pokemon, then he is weak against that defending Pokemon’s attack and you will want to swap him out. But if the message “Super effective” comes up, then he is defending well, and he will last longer than normal.
So ultimately, you will want to have Pokemon who can defend against a type well, and also have the right attack-type. This can take some time to work out, and I’m slowly doing this for my own Pokemon. Once I have more comiled information, I’ll post it up. But for now, I’ll put this table up
EDIT: These posts don’t allow HTML… so can’t do that.. never mind.