Every equipment has electricity running through it, but the enclosure of the equipment is insulated from the "electrical parts" of the equipment so that electricity does not reach the case. Somehow, due to malfunction, live wire (110-230V) comes into contact with the case, grounding (or earthing) can save your life.
For you to get a shock, current has to flow through your body into the ground. But, human body has a high resistance, so if there is a parallel smaller resistance most of the current will flow through the other resistance. Grounding provides the much smaller parallel resistance because it is just an electric wire running from the outside of the equipment to the ground.
But, because of the small resistance, a very high current will flow through the grounding wire and the circuit breaker will trip as mentioned by Jacob VanWagoner. This is how it will save your life when the malfunction takes place while you are in contact with the equipment. But, even if you are not in contact with the equipment, the high current through the ground wire will trip the circuit breaker. So, you will need to hunt down which equipment has malfunctioned if there are multiple equipments connected to the same circuit breaker.