Oscillations in the presence of friction, viscosity, etc are known as damped oscillations. The Energy is lost due to resistive forces acting on the system. This loss of energy causes an exponential decay in amblitude. The equation of motion is given by:
$$x(t)= A_{0}e^{- \gamma t}cos(\omega t)$$
Where
\( \gamma = \frac{b}{2m} \) - damping factor
\(m\) - mass of oscillator