In this prism, the red areas are the cross sections.
Take for example this question.
The cross section is the square with sides 20 cm. The area of this square is 20 cm x 20 cm = 400 cm2. The volume of the cuboid is thus 400 x 40 = 16000 cm3.
Take a more challenging question.
The cross section here is the triangle. The area of the triangle is 0.5 x 8 cm x 15 cm = 60 cm2. The volume of the prism is 60 x 10 = 600 cm3.
Try this question.