The second order differential equation arises from the application of Newton's Second Law.
$$\sum F = ma$$ In the case of oscillatory systems, such as a spring, there are two forces exerted onto the spring. The restoring force $-kx$ and the damping force $-bv$ where $v$ is the velocity of the spring. Note that the assumption of linear resistive force is only an approximation, and at higher velocities drag is actually proportional to the square of velocity.
$$\begin{align} -kx-bv &= ma\\\ m\ddot{x} + b\dot{x}+kx&=0\\\ \ddot{x}+\frac{b}{m}\dot{x}+\frac{k}{m}x &= 0 \end{align}$$ which is the equation you had above.