Iodine is naturally absorbed into the thyroid which if it’s a radioactive isotope of iodine then it can lead to damaging the thyroid or thyroid cancer.
Taking potassium iodide tablets will flood the thyroid with non-radioactive iodine which prevents the radioactive iodine from being absorbed into the thyroid. With too much iodine in the body the radioactive iodine will be quickly excreted in bodily waste.
Potassium iodide tablets only protect against damage due to radioactive iodine. It does not protect against any other radioactive materials. And it does not protect you if you’ve already been exposed to radioactive iodine. It must be taken just prior to exposure or immediately after to have any affect.
It is also not a magic pill. Flooding the thyroid with iodine is not a good thing. It in itself can damage the thyroid and cause other side effects. It’s just better than the alternative.