There are 3 rules in WiFi battles:
All Pokemon will be Level 50 even if they're under Level 50, Pokemon under Level 50 will get their stats increased to what they would be at Level 50, and Level 51 and more will get their stats decrease down to what they would be at Level 50. Note that they keep current EVs, even after they were acquired after Level 50.
Levels do not matter at all, so there could be a Level 10 Pokemon facing a Level 100 Pokemon.
These are the standard rules for competition battles. Number of Pokémon depend upon the battle type and there are numerous restrictions. You cannot use most Legendary or Mythical Pokemon, two of the same Pokémon or two of the same item.
When you battle in the battle spot, all Pokemon Level 50 and above are Level 50 for the battle, but all Pokemon Level 49 and under won't be Level 50, they will stay at their normal level.