If a rectangular loaf of bread was cut into slices, the shape and size of each slice would be the same. The loaf is a prism.
A prism has a cross-section which is the same throughout the shape.
A triangular prism has a triangular cross-section.
To calculate the volume of a prism, first calculate the area of the cross-section.
Multiply the area of the cross-section by the length.