How do scientists use the rate at which radioactive elements decay in rocks?

How do scientists use the rate at which radioactive elements decay in rocks?