I assume you have never played a pokemon server before, so i'm gonna tell you:
When you defeat a pokemon, you use a pokeball from your bag in the pokemon's body to try to catch it.
If you have less than 6 pokemon in your team when you catch a pokemon, you can use it right away, but if you have more than 6 it will be sent to your depot.