A square is to a plane as a cube is to a volume. A square, a two-dimensional shape, exists on a plane, which is a two-dimensional space. Similarly, a cube is a three-dimensional object and exists in a volume, a three-dimensional space.
The terms "square" and "cube" are occasionally used interchangeably, but in reality, they refer to mathematical objects of different dimensions. Two-dimensional objects like squares have the dimensions length and width, but not height. Three-dimensional objects like cubes have length and width as well as height. Whereas two-dimensional objects have only surface area as a measure of size, three-dimensional objects have surface area and volume.