Conservation of energy does not in fact occur in any real oscillation. Energy is always lost to heat and friction, meaning that eventually, without an external source of energy, oscillations always peter out.
Damping of this sort is often desirable and can be designed into a structure or machine. Large structures such as bridges experience vibrations which, if not damped, can shorten the life of the bridge. The shock absorbers on a car are designed to damp an oscillation very quickly – the vibrations may be dissipated by oil filled cylinders. At any instant the damping force usually increases with increasing velocity. A vibration may be lightly, heavily or critically damped.