If you're randomly found Partner survives your trip through the dungeon, when you come out...it will get into a special area made for it's type

It's found by going to the West of your hideout. You will get a menu where you select which Pokémon you want to see...go to it's name and you'll immediately get taken there. You can leave this new area and go to others via the map however

You can do many things in these hideouts, check the Pokémon to see how it is, check it's stats, attacks etc.

You can give it certain items aswell such as health, food among other things

You can essentially check all aspects of the Pokémon in it...

...and Release the Pokémon from your Rescue Force

The first option also allows you to take them to whatever dungeon you want. Quite handy to level up!

Once you have beaten Kyogre however, your partner will go to one of the hideouts and you will be able to trade who you are in control with so you can control ANY of the Pokémon that you have