The earth was removed from around the tree; Earth is the third planet from the sun.
Earth [THINK: specific planet, like Saturn; no “the”]
earth [THINK: ground, soil, planet we live on; “the”usually required]
“In English, proper nouns (nouns which signify a particular person, place, or thing) are capitalized.
Following this rule, when Earth is discussed as a specific planet or celestial body, it is capitalized…When Earth is a proper noun, the is usually omitted.”
“When you are talking about the ground or soil as a surface or stratum, then you must lowercase the word…It is acceptable to leave earth lowercase and use the with earth if you are talking about it as the planet we live on: The earth rotates on its axis.”
[read more about it on blog.dictionary.com]