Carbon-14 (radiocarbon) forms when cosmic ray neutrons collide with nitrogen-14 atoms in the upper atmosphere, transmuting them into radioactive carbon-14. This continuous production maintains the steady-state concentration of radiocarbon used in radiometric dating.