Although the time at which any individual atom will decay cannot be forecast, the time in which any given percentage of a sample will decay can be calculated to varying degrees of accuracy.
The learning curve has been long and is far from over today.
With each increment in quality, more subtle sources of error have been found and taken into account.
Rock samples are recorded, marked, sealed and kept free of contamination and excessive heat on the way to the lab.
The rock samples are crushed, in clean equipment, to a size that preserves whole grains of the mineral to be dated, then sieved to help concentrate these grains of the target mineral.
The method relies on satisfying some important assumptions: Given careful work in the field and in the lab, these assumptions can be met.
The rock sample to be dated must be chosen very carefully.
Any alteration or fracturing means that the potassium or the argon or both have been disturbed.
The site also must be geologically meaningful, clearly related to fossil-bearing rocks or other features that need a good date to join the big story.
What simplifies things is that potassium is a reactive metal and argon is an inert gas: Potassium is always tightly locked up in minerals whereas argon is not part of any minerals. So assuming that no air gets into a mineral grain when it first forms, it has zero argon content.