If you didn't know, Pokémon battles are a huge part of the game. Wherever you go, you're bound to bump into other Pokémon trainers--and they're all very eager to test their Pokémon companions against yours. The rules say you can't ignore a challenge, so if you don't want to keep running back home crying, you'll need to master the sport.
Basics of Battle
Typically, you only battle against other Pokémon trainers. In earlier games, you could battle wild Pokémon as well, but that's no longer the case. Although there are rare occasions where you can battle a wild Pokémon. Anyway, the battles all function the same.
To begin with, both trainers will send out the first Pokémon in their party. In your case, it'll be the Pokémon furthest to the left, along the top row. But if that Pokémon has fainted, you'll send out the next available one. Meanwhile, when encountering a wild Pokémon, the wild Pokémon will obviously be your opponent.
Battles in Pokémon are turn-based. Each turn, you and your opponent can both choose an action to perform. You've got all the time in the world, so don't rush, and do think carefully! That said, wild Pokémon battles are against the clock, so you will need to hurry up a little...
Once a battle has started, you can choose one of three options.
Fight will open up your current Pokémon's moves. Each Pokémon can have up to 4 moves at one time. As long as a move still has PP available, you can select it. If you're not sure what a move does, press the Y button to bring up a description (Poké Ball Plus users are out of luck though).
Pokémon lets you view your party and switch to a different Pokémon. Switching is a viable tactic if your current Pokémon is disadvantaged against your opponent's Pokémon. Just keep in mind your switch-in may take damage. So only do so if you think they can tank a hit.
Bag lets you browse your bag for healing and battle items. If your Pokémon is wounded or afflicted with a negative status, you may want to use an item to fix them up. As long as it's safe to do so, anyway. Likewise, you can use battle items to buff your Pokémon.
After selecting a move, the Pokémon with the higher Speed stat will use their move first, followed by their opponent. But note that some moves such as Quick Attack have increased priority. If switching or using an item, that action will take priority over everything else.
If the move deals damage, the targeted Pokémon's HP may be reduced. Once a Pokémon's HP reaches 0, they will faint and be removed from the battle. The owner of that Pokémon will then need to send out another Pokémon. Otherwise, if they've got none left, the battle ends in the other trainer's favour.
When you knock out (KO) an opposing Pokémon, all of your Pokémon will gain experience points, with any Pokémon that directly participated gaining extra amounts. After gaining enough experience, a Pokémon may Level Up, becoming stronger, occasionally learning new moves and perhaps even evolve.
At the end of a trainer battle, the loser will forfeit some prize money. If you win, you'll also receive some Poké Balls.
If the unthinkable happens and you lose a battle, don't fret. You'll be automatically taken back to the last Pokémon Centre that you visited. All of your progress will be kept, and you'll only be slightly poorer as a result. So cheer up and get ready for that rematch, eh?