Vertical compression is a transformation that scales the graph of a function vertically, either stretching or shrinking the graph along the y-axis. This transformation affects the amplitude or range of the function, altering the vertical scale without changing the horizontal scale.