Why do metals have free electrons?

Without getting into the quantum mechanical details, here’s a cartoon depiction of what’s going on. The vertical axis represents energy.

enter image description here

Like other answers have already pointed out, metals don’t have actual free electrons. In the cartoon this is given by the grey region. If electrons have enough energy to be in the grey region, they’re free.

In individual independent atoms (gaseous state), the energy levels below a certain energy are discrete. This is depicted by the lines in the cartoon. This means the energy is fixed, rigid. The electrons in this state can’t conduct electricity.

In solids however, the discrete states of multiple neighbouring atoms “merge” into a continuum and create what is called as bands. For further details you may look at my answers here.

With this, there exist a continuum of states called the conduction band where the electrons are not bound to any single atom of the solid. They are mobile. The fascinating property of these states is that it is possible for electrons to respond to an external electric field. These states are called Bloch waves.

In insulators there is a big energy gap between the filled states (valence) and the empty states (conduction). So without sufficient external field, they are unable to conduct electricity.

In metals however, the energy gap is absent and thus electrons can easily go into the conduction band and respond to external electric field.

Some details

The reason why mobile electrons seem like free electrons has to do with crystal symmetries. Specifically translational symmetry. In a crystal the atoms are arranged in a regular periodic manner. In the bulk (non boundary) of the metal if you go from one atom to another, the neighbourhood looks identical. This is known as translational symmetry. And a consequence of this is that the electrons have well defined momentum, just as a free electron does. This is encapsulated in the band structure.

In high school classes , free electrons is used interchangeably with mobile electrons even though they are not exactly same. Free electron is an electron is essentially out of the electron -positive site bound system. While mobile electrons are those which are loosely bound to the positive site so even though they are not free from the positive site's influence they can essentially hover above other positive sites among the sea of electrons in such a way that as a whole the conductor has no charge.

For example consider the electron of a Bohr hydrogen atom. If its given energy exactly equal to its ground state energy it becomes free in the sense that it is not bound to the nucleus any longer , if given any more energy whole of it will appear as KE.

On the other hand conductors have many orbits and the electrons in the last orbits are loosely bound to the nucleus due to screening and also because they are far from the nucleus. These are mobile electrons. But your book is calling them free electrons. Since these are loosely bound they can easily constitute a current.

I am afraid that the answer is not high-school level at all, let me try to explain anyway.

First of all, we talk about free electrons when they can move freely in space without external forces acting on them. Also we assume that they do not interact with one another (this is really tricky because they are charged particles, but I won't discuss this assumption). Clearly in a metal there is a crystal made of ions that acts with external forces on the electrons. However it turns out that the electrons with higher energy act as if they were free electrons, and since only the electrons with higher energy are responsible for conduction, we can treat metals as free electrons systems.

Technical details

Free electrons have energy levels described by the dispersion relation $\varepsilon_k = \hbar^2k^2/2m$, where $m$ is the mass and $k$ is the momentum. At zero temperature the particles occupy all the available electronic states from $k=0$ up to $k=k_F$, known as Fermi momentum, corresponding to an energy $\varepsilon_F=\hbar^2k_F^2/2m$ and when $k\sim k_F$ the dispersion relation is approximately linear in momentum $\varepsilon_k \sim \varepsilon_F + \hbar^2k_F(k-k_F)/m$.

When electrons are bounded by a periodic potential as in metals, the dispersion relation changes completely, in particular one can prove that for a one dimensional lattice with step $a$ the dispersion relation reads $\varepsilon_k = \mp 2t \cos{(ka)}$, where $k$ lies in the first (reduced) Brillouin zone $k \in ]-\pi/2a,+\pi/2a]$ and $t$ is called hopping and it's given by $t = \hbar^2 \eta /2ma^2$, $\eta$ being a dimensionless parameter which depends on the specific ions. You can plot the dispersion relation as an exercise. At zero temperature the electrons occupy all the energy states described by $-2t \cos{(ka)}$ and thus the Fermi momentum is $k_F = \pi/2a$ and the Fermi energy $\varepsilon_F=0$. Now you can expand the dispersion relation close to the Fermi momentum and you get $\varepsilon_k \sim 2t (k - k_F)a = \hbar^2 \eta (k-k_F)/m a$. You can easily rewrite the latter formula as $\varepsilon_k = \varepsilon_F + \hbar^2 k_F(k-k_F)/m^*$, where $m^* = (\pi/2\eta)m$.

As you can see, close to the Fermi level the dispersion relation of bounded electrons is formally equivalent to that of Free electrons with an effective mass $m^*$. Now since only electrons close to the Fermi level are affected by excitations, scattering process etc. due to Pauli exclusion principle, you can see that the "important" electrons can be treated as if they were free electrons with some effective mass. This is precisely the reason why the free electron model describes quite well the properties of metals. Finally notice that insulators and semiconductors have completely different dispersion relations, so this similarity is no longer true.