Why does radioactive dating work on specific rocks?
There are other, mostly chemical processes which alter the isotope ratios. Isotope dating uses a combination of them. This is why it can not be used always, for any radioactive isotopes, only in special circumstances. It also requires very sensitive measurements (below in the second example, close to induvidually count lead atoms in microscopic zircon crystals).
For example, in carbon dating, C14 is continuously generated in the atmosphere due to the cosmic radiation, and builds in the biosphere, where it decays. If a plant stops accumulating carbon ( = it dies), its C14 ratio starts to decay.
Another example, this time about isotopes which were created really with the Solar System. The mineral zircon ($\rm{ZrSiO_4}$) accumulates uranium and thorium atoms in it crystal structure, but strongly rejects lead. This rejection can happen as it freezes. After it is solid, the lead atoms created by U/Th decay do not go away any more. Thus, all the lead in the zircon crystals of the soil of Moon, were created since it frozen. This makes possible to know, when did that zircon solidify ($\approx$ when formed the crust of the Moon).