The purpose of the ground wire (in U.S. terminology) is to provide a path back to the source of the electrical current — the main electrical panel — in the event of a fault. Hopefully this current is enough to trip the breaker or blow the fuse. A fault might be something like having the hot live wire of an appliance touch its metal case.
The purpose of the ground wire is NOT to provide a path to the ground, or to some rod buried in the ground. I can’t stress that enough.
In the U.S. and the U.K., and I think in the rest of the world, our electrical system is grounded at the utility transformer. This means that at the transformer there’s a cable from the neutral terminal that goes into the ground. One big benefit of this type of grounded system is protection from lightning strikes.
Remember that electricity will always try to complete a circuit. It always wants to go back to where it came from. In our case that’s the utility transformer.
Things are a little different in other countries, but you get the idea. There are high voltage cables coming into the utility transformer, there are low voltage cables coming out and going into the house, and the neutral side at the transformer is connected directly into the ground.