The volume of the rectangular prism is given by the product of its dimensions:
Volume = 10 * 7 * 8 = 10 * 56 = 560
In the first image, we can count 7 cubes in the prism.
In the second one, we can either count the number of cubes one by one or realize that this number equals the product of the square they occupy:
Number of cubes in second image = 7 * 10 = 70
That happens because we had 10 columns of 7 cubes each.
Now, for the third image, we have 8 columns of 70 cubes each. Therefore, the total number of cubes in the prism is now:
8 * 70 = 560
Notice that the number of cubes (of sides 1) in the prism equals the volume of the prism.