Objects can be created by joining together triangles. Each triangle can be given a different color/texture.
Here, each face of each cube is made up of 2 triangles. For example, the 2 triangles making up the front face of the closer cube have been colored using a different texture so that they can be distinguished.