The simplest answer is that current times voltage is power, so a battery that delivers 30Ah at 12v will supply 2A to provide 48W, and supply it for 15 hours.
The practice is that for lead-acid cells, the actual power delivered is less than this. The normal model used for this is something called Peukert's Equation, which involves raising your current to the power of the mysterious Peukert number before calculating the battery life. So if our battery has a Peukert number of 1.1, then the 2A becomes 2.144A, and it only lasts 14 hours (30Ah divided by 2.144A equals 14h).
But if the battery had a Peukert number of 1.25, then the 2A becomes 2.378A, and the battery only lasts 12 hours and 37 mins.
Peukert number varies for types of cells - the best traction batteries might be as low as 1.03, but UPS backup batteries might easily have numbers of 1.25 or more.