Earthing gives fault current a safe path back to the source. When insulation fails, a good earth lets the protective device trip quickly instead of leaving a metal enclosure live.
An earth electrode is only as good as its resistance to ground. Soil moisture, rod depth and corrosion all change that number, so earth resistance is measured at commissioning and checked again during maintenance.
Good practice also means bonding exposed metalwork, keeping joints tight and clean, and labelling the earth network so nobody disconnects it by mistake.
This note is general information, not instruction for do-it-yourself work. Electrical work must be done by qualified persons following applicable laws and standards.