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
Use rich earth in the bed
Use Earth and Mars
Avoid dug in the Earth