Compression happens when you frame your subject identically in each shot, but use a zoom lens at different focal lengths. In the example below, I framed Mr Spooky Pants (more or less) head to toe. I kept the same exposure - the only thing that change was my distance from my subject.
As you can see, at 18mm, my background shed looks a hundred feet away. This is because of the wide angle I am shooting at. As I move back, and zoom in, the scene compresses, and the shed gets closer and closer.
One other effect to be aware of is the changes in background blur. Although all four images were shot at f5.6, the 300mm zoom, due to the compression, has blurred the background far more than the f5.6 at 18mm.
Now then - why should this matter? Well, it depends on your intent. For portraiture, you would not want a crystal clear background taking away from the subject of your image, (as well as not wanting to be right up in your subjects face) unless your background is more attractive than a shed (sunset, etc.) So in that case, use a medium zoom to help blur the background, but also to not clutter the background as in the 300mm shot. This is what makes the 50mm 1.8 my favorite lens.
On the other hand, if you are shooting a landscape photo, you would want to shoot with a wide angle, keeping the background as clear as possible, and, of course, more of it.
So, I'll repeat. Be aware of your background.