earth / Earth
The ground versus the planet.
Lowercase earth for soil and for the ground: dug in the earth. Capitalize Earth when you name the planet as you would name Mars or Venus: Earth is the third planet. Down to earth and on earth stay lowercase.
Examples
Userich earth in the bed
UseEarth and Mars
Avoiddug in the Earth