Volume is the amount of space occupied by a threedimensional object.
Volume is measured in cubic units.
An object's volume is the number of unit cubes which comprise the object.
A unit cube is a cube with the dimensions of 1 unit by 1 unit by 1 unit.
The volume of a unit cube is 1 cubic unit.  
Volume of Rectangular PrismVolume = length × width × height
OR
Volume = base × height
[where base is the area of the base]
For a cube with side length s, the volume is s × s × s.
By counting, there are 8 1inch unit cubes in each layer.
There are 3 layers of 8 cubes. Add to find the total number of cubes.
So, 24 1inch unit cubes will fill the box.
Since each cube is 1 cubic inch, the volume of the box is 24 cubic inches.
Or, use a formula.
Volume  =  B × h 

Volume  =  length × width × height 
 =  8 sq in. × 3 in. 

 =  4 in. × 2 in. × 3 in. 
 =  24 cubic inches    =  24 cubic inches 
The volume of a rectangular prism can be found by multiplying its dimensions: length, width, and height.
Volume  =  length × width × height 
 =  8 feet × 3 feet × 6 feet 
 =  144 cubic feet 