If we're just talking about 3D stuff, then we're really talking about matrices and matrix transformations. Very deep topic. Googling quickly, maybe
http://www.opengl-tutorial.org/beginner ... o-matrices would be a place to start.
Perhaps the most important thing to understand is this: In Magic, if the only modules you use are Model, DepthTest, Scale, Rotate, and Translate, then you are never dealing with 2D images (except for the final rendered image). All these modules operate directly on the overall geometry of the scene. More specifically, they alter the current matrix, which you can think of as the mathematical context inside which an object is rendered. As the quote says at the top of the linked page, "The engines don’t move the ship at all. The ship stays where it is and the engines move the universe around it." This is particularly relevant because an object doesn't know anything about its position/size/rotation in the world. When dealing with 3D graphics, the world gets manipulated so that when an object gets drawn (or requested to be drawn), it is always drawn at the current position/size/rotation ("state") of the world. Then to draw another object in the same scene, the world gets un-manipulated back to its default state, and then re-manipulated in a different way. It seems backwards at first, but it is extremely fast and efficient when using graphics cards which are specifically optimized to do matrix math (called linear algebra):
https://en.wikipedia.org/wiki/Linear_algebra#Matrices.
Here is another similar Q&A I found: "How does the camera work in 3D applications? As far as 3D applications are concerned, there is no camera. More specifically, the camera is always located at the eye space coordinate (0., 0., 0.). To give the appearance of moving the camera, the application must move the scene with the inverse of the camera transformation." The key is:
move the scene with the inverse of the camera transformation. So now you might understand that the Magic modules I described above don't actually move objects; they move the scene.
Further, the idea that there are "objects in a scene" is in some sense a human simplification for the purpose of more intuitively understanding how 3D graphics works. But behind the scenes (pun intended?), there are no objects, just a ton of math determining where and how to draw millions of independent triangles.
In Magic, as soon as you start using 2D modules (any image effects, etc.), then you do an intermediate "rendering" of the world into a 2D rectangle which is drawn at the exact dimensions of the current window and textured with a snapshot of the scene. But it still exists in the 3D world. So if you put any Scale/Translate/Rotate modules after it, then you are manipulating that rectangle just as you could manipulate something in the Model module. But those later modules won't affect any of the geometry before the intermediate render.
As a closing thought, anytime any program uses shaders to create 2D effects, it's just a "trick". You're actually seeing a dynamically textured rectangle in the 3D world which happens to be drawn at an (x,y,z) position that perfectly covers the current window size.