This also works the other way: Incoming electromagnetic waves will get canceled by the moving charges in the Faraday cage. Your phone won’t know that it’s getting a text message or call.
Let’s focus for a minute on why the cage’s materials are important. A Faraday cage is made from an electrical conductor, metals like copper, aluminum, and steel. In a conducting material, atoms are able to share one of their electrons with neighboring atoms. This means that an electron is mostly free to move from one atom to the next. That’s not the case for an insulator, a material like wood, plastic, or glass. For an insulator, these electrons are stuck with their original atoms and can not move around.
Because conductors can let charges move, some cool stuff can happen. Namely, when an electric field encounters a conducting material, it will move charges so that the net electric field is zero.
Here’s a thought experiment: Imagine that I have a sphere made of a conducting metal and I add some extra electrons. (These extra charges could come from anywhere, but the most common real-life example is from an electrostatic interaction, like what happens when you rub a balloon on your hair: Electrons move from your hair to the balloon. This interaction is also what gives you a shock when you take your socks out of the dryer, what makes your hair stick up in the winter, what makes an N95 mask work, and what makes a Leyden jar glow.)
Let’s say I add 100 electrons to my sphere by touching it to some electrically charged socks straight from the dryer. These electrons all create electric fields that push on the other electrons. As a result, they all get pushed apart and end up on the surface of the sphere. (They can’t just jump off the sphere.) Here’s what it would look like:
But here is the very important part: Now these electrons are arranged on the surface of the sphere in such a way that the total electric field at any point inside the sphere is zero. (It has to be zero. If the field wasn’t zero, then it would push on the free electrons, and any charge that can move would move toward the surface of the sphere.) With a zero electric field, you can no longer have an electromagnetic wave. The sphere is now a Faraday cage.
What about the magnetic field—does that get canceled too? Not in the same way as the electric field. The problem is that there’s no such thing as a magnetic charge. This means you can’t get a separation of magnetic charges to cancel the magnetic field inside the conductor. But don’t worry, remember that an electromagnetic wave needs both a changing electric field and a changing magnetic field. If you cancel the electric field, you won’t have an electromagnetic wave.
Real Faraday Cages
A Faraday cage doesn’t have to be a sphere. It can pretty much be any shape with a hollow interior. (Since the charges end up on the surface of the shape, it doesn’t matter if it’s hollow.) But in practice, you can’t just cover your phone with any electrical conductor and expect it to act as a Faraday cage. There are two factors that are also important: the thickness of the material and its solidity. Let’s start with the thickness.
One parameter of a Faraday cage is its “skin depth.” This is a way to calculate the minimum thickness of a material so that it can effectively cancel EM waves. The skin depth depends on the resistivity of the material (how difficult it is for the electrons to move), the frequency of the EM wave, and also the magnetic properties of the material. This means that for longer wavelengths (like radio waves) you would need thicker material in your cage.