A spring on a floor, fixed to a wall, drawn at its natural length and again squashed by x, measured from the dashed line where its free end was. The applied force F pushes the block toward the wall, and the coil is drawn shorter with the same number of turns, so it looks like the same spring pushed in.