There are no fights before player level five. You will also not receive Potions and Revive items from Pokéstops before this level, as you have no use for them without access to fights.
Evolving can be helpful, although Combat Power (CP) is generally a much stronger indicator of success in a Gym battle. Additionally, you will want to build your team to combat the enemies' strengths and weaknesses. This follows the typical format from earlier Pokémon games (e.g. Fire is super effective against Grass, Electric is super effective against Flying, Water is super effective against Fire, etc.). This web page should be a useful resource in helping you build a strong team to counter your opponents' types.
The gym system is a little complicated, but in essence, by fighting an enemy gym you reduce that gym's prestige (until eventually your team takes it over). Once your team takes over a gym, you can increase its prestige by continuing to battle there. If there is an empty slot in the gym, you should be able to station a Pokémon there, which will help defend it from enemy teams. Once every 21 hours you can claim a reward for holding a gym by going into the shop menu and tapping the shield icon in the top right. The reward for each Pokémon that is still stationed in a gym is 500 Pokédust and 10 Pokécoins.
Can more than two players simultaneously battle a gym?
Yes, but not in the double battle style seen in the Gameboy/DS games. Both are battling in separate battles to reduce the prestige of the gym and thus take it down.
As @Teaganator describes in his/her comment below: "You can be in the same battle instance with a teammate battling a gym. How that works it both players take damage as if they were alone, but they both deal damage at the same time."
You can also tell if you are battling with someone else because an icon will appear on the left side of the screen under your Pokemon's health that will tell you the nu
Can gym members of X and Y fight together against gym Z?
I would assume so, only because of the way I understand battling a gym as explained above. Both are trying to reduce the prestige of the gym.
Do players teaming up together have to start the battle within a window of
time or simply as long as a battle is in session?
No need to start at the same time because you aren't battling together as a unit. Just attacking the gym simultaneously.
I don't know for sure, but from what I witnesses last night, as long as the second(or subsequent) person joins while the first(or previous) is battling, they will be grouped into the same battle. Now I'm not sure if starting at the same time will cause a problem and create 2 "instances" of the battle. I would hope/assume not though.
Can you team battle at your own gym with players of the same color?
I'm going to assume instead of battle you mean train. In which case yes, multiple members of the same team can train on a allied gym at the same time.
This I do not know. I didn't test this last night. I encourage those in the comments to chime in and I can edit this part.
In the event that you and an ally remove the prestige from an opposing
faction's gym, what dictates who places a pokemon there?
Whoever gets their Pokemon in first. If you're playing with a friend or someone on your team you might want to coordinate what you're putting in. If you think you and a mutual enemy took down the gym then you want to get a Pokemon in there ASAP to claim it.
Edit Note: Last night after defeating an enemy gym, 3 players put in 3 Pokemon immediately after taking down the gym. I wasn't aware you could do this. I thought you had to put in one, increase prestige, put in another, etc. Was this a glitch? And if not could someone explain this to me?
In Conclusion:
There is no special condition when battling as a team. You are concentrating your efforts with another player to reduce the prestige of an enemy gym or raise the prestige of an allied gym faster.
Also I was REALLY wrong initially.
Also, thanks to users Theyna and Teaganator in the comments for being right when I was wrong.
Best Answer
In the context of what you just did, you created a “party”. These are pre-made teams for battles.
As far as battles, there are two ways to initiate this
Close Range
This can be done with any trainer in close proximity. To battle another trainer, click the “Near By” bar on the bottom right of your screen and the swipe left. In this menu, there will be one of two options:
To send a battle request, click “Challenge Trainer”. This will open your camera to scan the QR code of the opposing trainer
To receive a battle request, click the box with the QR code for the opposing trainer to scan
Long Range
By going to your friends list and viewing a trainer profile, you have the ability to challenge anybody whom you are Ultra or Best Friends from anywhere in the world. In the trainer profile, press “Battle” to send a battle request
After doing either of the above and both trainers are ready, you can now partake in a trainer battle