|The measure of the occupied space is called the Volume of the object.|
If an object is solid, then the space occupied by such an object is measured and is called the Volume of the object.
On the other hand if the object is hollow then the interior is empty and can be filled with air or some liquid then will take the shape of its container. In this case, the volume of the substance that can fill the interior is called the Capacity of the container.
In short the volume of the object is the measure of the space it occupies and the capacity of an object is the volume of the substance its interior can accommodate. Hence the unit of measurement of either of the two is cubic unit.
In the above figure the area of each rectangle is A and height up to which the rectangles are stacked is h and the volume of the cuboid is V.
V = A x h
Volume of a Cuboid = length x width x height = base area x height
Volume of Cuboid = l x w x h = A x h