To find the volume of a solid, slice the solid into thin pieces. If a piece has cross-sectional area A(x) and thickness Δx, then it has approximate volume A(x)Δx. Adding up the volumes of the pieces and taking a limit as we slice finer and finer, we get
Volume=∫baA(x)dx
where a and b are the x-values of the leftmost and rightmost slices.
Of course, we could also slice horizontally or front-back, in which case we would integrate A(z)dz or A(y)dy.