We know that in reality, a spring won't oscillate forever. Frictional forces will diminish the amplitude of oscillation until eventually the system is at rest.
Damping is an influence within or upon an oscillatory system that has the effect of reducing, restricting or preventing its oscillations. In physical systems, damping is produced by processes that dissipate the energy stored in the oscillation.
On the other hand, a mass in air oscillates many times before it comes to rest. To incorporate friction, we can just say that there is a frictional force that's proportional to the velocity of the mass. This is a pretty good approximation for a body moving at a low velocity in air, or in a liquid. So we say the frictional force fr=−bv . The constant b depends on the kind of liquid the mass is in and the shape of the mass. The negative sign, just says that the force is in the opposite direction to the body's motion. Let's add this frictional force in to the equation fnet=ma
Graph for damped oscillator: