Your torso and head's inertia tend to keep them at rest (Newton’s first law.) When your car is struck from behind, the seat pushes your torso forward. If you also have a headrest, it will push your head forward, keeping it relatively at rest with respect to your body and guarding against whiplash.
Work Step by Step
This is discussed on pages 25-26.