A shock absorber (in reality, a shock "damper") is a mechanical or hydraulic device designed to absorb and damp shock impulses. It does this by converting the kinetic energy of the shock into another form of energy (typically heat) which is then dissipated. Most shock absorbers are a form of dashpot.
Pneumatic and hydraulic shock absorbers are used in conjunction with cushions and springs. An automobile shock absorber contains spring-loaded check valves and orifices to control the flow of oil through an internal piston (see below).
One design consideration, when designing or choosing a shock absorber, is where that energy will go. In most shock absorbers, energy is converted to heat inside the viscous fluid. In hydraulic cylinders, the hydraulic fluid heats up, while in air cylinders, the hot air is usually exhausted to the atmosphere. In other types of shock absorbers, such as electromagnetic types, the dissipated energy can be stored and used later. In general terms, shock absorbers help cushion vehicles on uneven roads.
In a vehicle, shock absorbers reduce the effect of traveling over rough ground, leading to improved ride quality and vehicle handling. While shock absorbers serve the purpose of limiting excessive suspension movement, their intended sole purpose is to damp spring oscillations. Shock absorbers use valving of oil and gasses to absorb excess energy from the springs. Spring rates are chosen by the manufacturer based on the weight of the vehicle, loaded and unloaded. Some people use shocks to modify spring rates but this is not the correct use. Along with hysteresis in the tire itself, they damp the energy stored in the motion of the unsprung weight up and down. Effective wheel bounce damping may require tuning shocks to an optimal resistance.