The idea is the level of C14 in the atmosphere is constant, and living organisms will have about about the same ratio of C14 to C12. When they die they no longer replenish the C14 so the amount decreases over time as it decays (it's radioactive). You can then calculate how old something is based on the ratio of remaining C14 to C12. I'm not sure what the process is that relates C14 to stalagmite because it's inorganic.