The term ‘Grounding’ refers to the concept of connecting a wire to the earth which is considered to be at zero potential and measure all other voltages with reference to that. It is considered so, only for convenience since surface of earth is very large eventhough the ground potential is not always the same at two different places.
Grounding provides a path for the current to flow in case of a circuit fault. This protects both the device and the person using the device.You also ground the circuits in order to shield the devices from any kind of interference and prevent shocks in case of short circuits.
In case of DC circuit, the negative terminal is always connected to the ground. The ground provides a common reference point for measuring voltages. If in a device, the only connections are the two ends of its power source, it is not said to be stable because the voltage levels may vary. Neither would be at zero volts. Hence as a standard, the negative terminal is always connected to ground.The difference between zero and whatever positive voltage is supplied is what drives the circuit.
In AC circuits, there are no positive and negative terminals but there are 3 lines -‘live/hot’, ‘earth’ and ‘neutral/return’ lines. You have learnt that electrical circuit is a continuous loop. In your house, current enters the service panel and travels throughout your house and has to return back to your panel. Current enters a circuit loop on the hot wires, and returns via the ‘return/neutral’ wires. ‘Earth’ line is connected to the ground. In case of any fault happening in the circuit, instead of neutral line carrying the current, the earth line safely conducts the current to the ground.