When a metal box like in Figure 1 is placed in a uniform electric field, the field induces charge in the box and the induced charge produces an electric field opposite to the applied field. The applied field draws negative charge towards it and pushes the positive charge away form it. The applied electric field is cancelled by the induced electric field and the net field inside the box is zero. Such a box is also called as the Faraday cage.

Figure 1 Faraday cage; saves you from lightning and other electric discharge, is a metal cage. The electric field inside the cage is zero and the charge always tends to lie on the outer surface of the cage.

The Gauss's law tells you that when you make a Gaussian surface just inside the boundary of the metal cage and the electric field is zero, the charge inside the Gaussian surface or within the metal cage is zero. This also concludes charges lie on the outer surface of a conductor.

An example is a car during lightning, the safest idea is to stay inside the car during lightning. If the car got a lightning, the charge remains on the outer surface of the car and zero or very little electric field is produced inside the car. In this case the car becomes some kind of a Faraday cage. This effect is called electrostatic shielding.