Telephoto lenses magnify distant objects.
With their small angle of view, telephoto lenses capture less of the background, seemingly compressing distance. By changing the lens focal length, you can use this effect to strengthen or weaken the effect of distance.