In this paper we use the algebraic and the invariant method to study the time-dependent damped harmonic oscillator from classical and quantum points of view. The solution of the classical equation of motion and the wavefunction solving the time-dependent Schrödinger equation are found explicitly. We show that the original time-dependent quantum-mechanical problem is completely related to the well known time-independent harmonic oscillator. In addition, we elucidate the intimate connection between the damped harmonic oscillator (DHO) and the generalized harmonic oscillator (GHO). More importantly, the evolution of the states of the DHO cannot be cyclic, in contradistinction with the states of the GHO. Explicit expressions for both the dynamical and the geometric angles and phases are deduced in the adiabatic limit. The coherent states describing the invariant-angle variables of the classical DHO are constructed; they allow us to recover the classical evolution and invariant from the quantum evolution.