The term "harmonic oscillator" is used to describe any system with a "linear" restoring force that tends to return the system to a equilibrium state. There is both a classical harmonic oscillator and a quantum harmonic oscillator. Both are used to as toy problems that describe many physical systems.
Here "linear" means that the force, $F$ has a form like $F = -k(x - x_0)$ where $x$ represents the position of the system, $x_0$ the position of the equilibrium, and $k$ is a positive constant.
Such systems are very common in mechanics.
If we allow "force" and "positions" to take on generalized meaning, such systems are very common in most fields of physics.
The term is generally applied to any system which can be modeled with the mathematics used for the mechanical system, in part because almost any stable arrangement can be modeled as a harmonic oscillator for small displacements.
The solutions are oscillatory in nature and described by sinusoids.
Damped and/or driven harmonic oscillators
An even larger class of problems can be described by adding resistive terms proportional to the "velocity" of the system and external driving forces.
The quantum harmonic oscillator is discussed in most introductory quantum-mechanics textbooks. It can be solved either by a series solution using the method of Frobenius, or by a method (due to Dirac) that uses algebraic operators. Griffiths solves this problem using both methods in chapter 2.3. Shankar (2nd Ed.) covers it in chapter 7, again using both methods. Finally, Liboff (2nd Ed.) covers it in chapter 7.2 to 7.4.