The diagram, or net of a cube shows what the cube would look like unfolded and also shows the surface area. A square is just a square; a 2-dimensional object, whereas a cube is a 3-dimensional...
A cube is different to a rectangular prism because in a cube all the edges have to be equal in length, where's in a rectangular prism the edges can be of various lengths.