Once checked in at the airport, pets are initially kept in a separate air conditioned facility, usually a sound proofed room so various vehicles in the cargo warehouse don’t stress them.
They are treated as high priority and should be loaded onto the plane last, and then first to be unloaded. They are given water just before loading, or a large ice cube so as not to spill whilst loading and take off. Once the cargo holds doors on the aircraft are shut, there is no way to access till they are opened again after arriving at the destination.
The hold is kept at the correct pressure and temperature just as the passenger cabin is, and the captain will always be aware of animals in the hold.