We have a cube one meter side and we divide it into smaller cubes of one millimeter side. Now we put all the small cubes in line next to each other.
How long will the row of squares be?
From a cube of one meter side we can extract 1000 * 1000 * 1000 = 1000 million cubes of one millimeter side. Every thousand cubes of a millimeter arranged next to each other constitute a meter, a thousand thousands will form a kilometer and therefore the line formed will have a total 1000 kilometers in length.