In the very beginning of earth's history, this planet was a giant, red hot, roiling, boiling sea of molten rock - a magma ocean. The heat had been generated by the repeated high speed collisions of much smaller bodies of space rocks that continually clumped together as they collided to form this planet. As the collisions tapered off the earth began to cool, forming a thin crust on its surface. As the cooling continued, water vapor began to escape and condense in the earth's early atmosphere. Clouds formed and storms raged, raining more and more water down on the primitive earth, cooling the surface further until it was flooded with water, forming the seas.
It is theorized that the true age of the earth is about 4.6 billion years old, formed at about the same time as the rest of our solar system. The oldest rocks geologists have been able to find are 3.9 billion years old. Using radiometric dating methods to determine the age of rocks means scientists have to rely on when the rock was initially formed (as in - when its internal minerals first cooled). In the infancy of our home planet the entire earth was molten (melted) rock, a magma ocean.
Since we can only measure as far back in time as we had solid rock on this planet, we are limited in how we can measure the real age of the earth. Due to the forces of plate tectonics, our planet is also a very dynamic one; new mountains forming, old ones wearing down, volcanoes melting and reshaping new crust. The continual changing and reshaping of the earth's surface that involves the melting down and reconstructing of old rock has pretty much eliminated most of the original rocks that came with earth when it was newly formed. So the age is a theoretical age.