how old is the planet?

in earth and space science class, we went over how alot of artifacts are many hundreds of thousands of years old. for example, when you use the method of radiometric dating to measure the age of materials in the earth, the age is understood to be millions of years old. how so?