U-235 - the component of weapons grade uranium that makes it effective for bombs, by allowing a rapid enough reaction to build up to a chain reaction - is about 10 times as radioactive as U-238. U-235 has a half-life on the order of hundreds of millions of years. U-238 has a half-life on the order of 4 billion years.
So the size of the sample and a measurement of the level of radioactivity combined can tell you roughly how much U-235 there is, compared to U-238. You put in X U-238 and Y U-235, X + Y equals this much material, rate(238) times X plus rate(235) times Y equals this much measured radioactivity, solve your 2 equations for X and Y. Not hard.