A shock absorber generally consists of a piston that moves through a liquid or through air. By being pushed through the fluid, it changes the kinetic energy of its movement to heat.

A shock absorber is generally used in conjunction with a spring.

They are not only used on cars, of course, but on all sorts of vehicles - trucks, motorcycles, etc., and even on bicycles.

Shocks and springs act in a manner analogous to certain electronic components.