Since radioactive decay is known to occur at a constant rate, the age of a rock can be determined from the ratio of the parent element to the daughter element.
The concerns about these dating methods were exactly the same that creationists continue to raise - presence of the daughter element at the time the rock was formed and possible loss / gain of either the parent or daughter element at some point in the history of the rock.
Unfortunately, the age cannot be computed directly from material that is solely from the Earth.
There is evidence that energy from the Earth's accumulation caused the surface to be molten.
Some of these rocks are sedimentary, and include minerals which are themselves as old as 4.1 to 4.2 billion years.
Mountains have been built and eroded, continents and oceans have moved great distances, and the Earth has fluctuated from being extremely cold and almost completely covered with ice to being very warm and ice-free.
For this reason, the tests were designed to account for those possibilities.
Initial daughter element can often be accounted for by either measuring the amount of an isotope of the daughter element (the ratio of isotopes are almost always constant).
These changes typically occur so slowly that they are barely detectable over the span of a human life, yet even at this instant, the Earth's surface is moving and changing.
As these changes have occurred, organisms have evolved, and remnants of some have been preserved as fossils.