Your vehicle will undergo all kinds of shaking and bouncing when on the road, but with the best shock absorbers, you will hardly notice any of it.
In general, shock absorbers are meant to absorb shock or dampen the ride to make it smoother. They work by dampening the shaking and bounce that come from the spring and tires, and by ensuring the chassis does not move according to these actions. Like with most other vehicles parts, they get worn out at some point and so you will need to change them.