Lens compression and even the idea of its existence can be a touchy technical subject among photographers. I'm not here to draw a line in the sand over the subject, but I am going to do my best to explain compression as thoroughly and simply as I possibly can.
Here it goes: To take a look at what's happening we have to conduct a few visual experiments. You may have seen animations like the one below of my friend, Matthew, (which admittedly makes him look like a mean man, but I assure you, he's one of the sweetest humans alive).
What you see in the animation is the subject remaining relatively the same size in the frame between focal lengths of 24 mm and 200 mm. The subject's physical position and size in the frame do not change. In this experiment, this is our constant.
The variable is the changing distance of the camera with the subject and the background. The camera must be pulled further away to maintain the same frame at 35 mm as seen at 24 mm. The same is true for each step closer to 200 mm. The result is the animation you see.
It certainly does appear that the background moves closer with longer focal lengths and further away with shorter ones. This is what most people think of and refer to when talking about "lens compression." I'm not saying that the effect doesn't happen. It does. What I am saying is that it is not the lens itself that causes the effect. It's the distance of the camera from the subject and the background.
As the camera moves back, Matthew becomes smaller in the frame. The focal length is increased to compensate, which makes it appear that he is the same. As a result of the ever-narrowing field of view, it seems that the background is growing larger. In reality, it is just that less and less of the background is seen.
Take a look at the examples below:
Edited with Mastin Labs Ektar 100 preset
The two images above were taken on a tripod from the exact same position. The one on the left at 200 mm and the one on the right at 24 mm. If the supposed compression of a telephoto lens pulls the background closer as many believe, then these images should not line up if you crop or zoom and overlay them. Let’s see.
Here is what happens if the 200 mm frame is made smaller:
A frame taken at 200 mm made smaller and laid over the 24 mm frame. Edited with Mastin Labs Ektar 100 preset
Closer in on the same image above.
As you can see, it's a perfect match. It also works in reverse. Enlarging the 24 mm frame to overlay the 200 mm frame also aligns with near perfection.
So, what is happening? Are your eyes playing tricks on you? Not exactly.
It may help to think of a telephoto lens as a "crop" lens. That isn't to say that it is actually cropping your image, but relative to subject/camera distance, from the same position, it takes a much tighter, (or cropped) image of the same scene from that position.
This means that, if you stand 20 ft from your subject and take a picture with a 24 mm lens, and then from the exact same position, take a picture with a 200 mm lens, it is as if the telephoto lens is taking a very good "crop" of the same frame that was taken at 24 mm. This is because a telephoto lens has a much narrower field of view, making it appear that the background has been "compressed" and pulled closer toward you and the subject. Take a look at the diagram below.
Depicting the differences in field of view of 24 mm & 200 mm at the same position.
If you were so determined, you could take the same wide-angle frame of the 24 mm lens with a telephoto lens, but due to the field of view, you would have to back way up, multiplying your distance many times. Even then, you would still be able to overlay and line up the images easily.
Moving back many times over with a telephoto lens to achieve the same field of view as a wide lens.
In closing, I think what's important to remember is that these effects, which are commonly referred to as "compression," are not caused by the lens or its focal length but by the changes in distance between photographer and subject. This is also known as "perspective distortion."
The how's and why's are honestly only so important. What all of this really comes down to is knowing your tools at a functional level. No matter how or why the differences between wide and telephoto focal lengths exist, we see them and their effect.
Given that we know our tools, we know that if we choose to take an up-close portrait with a 24 mm lens, it's going to have a distinct look and feel to it, and the same is true of a 200 mm or any other focal length we enjoy using. Unless you're about to embark on a journey of building your own lenses, you could honestly just leave it at that.
As a famous Pablo Picasso quote says, "Learn the rules like a pro, so you can break them like an artist."