The Hideout can protect a certain maximum of units from attacks. You can build the Hideout at Keep level 8 and place your units in the Hideout to protect them from attacks. The higher the level of your Hideout is, the more units can be protected.
Keep in mind, that units inside the Hideout can’t be used for battle. Don’t forget about them!