This optical illusion is taking advantage of the 3-D drawing technique of overlap to setup a structure which could not exist with normal cubes. The cubes overlap in a way that they couldn't possibly in real life. We see the object on top as being closer, since it obscures the object behind it. This technique can be used to make an impossible picture that looks real. Neat, huh?