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
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
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