The electrical conduction in matter is exclusively due to the existence of free electrical charges. The word free means mobile in the sense of free to move. In solids, they are mainly electrons. Each chemical element is made up of a large number of electrons, but when it comes to electrical conduction, it is really the "free" electrons that interest us. Some materials have few or no free electrons. They are insulators.
How to study this population of free electrons and distinguish them from non-free or bound electrons? Quantum mechanics has answered this question, specifically the study of the energy levels occupied by each electron in an atom. The theory as a whole is complex. Let us remember that each electron does not occupy a precise position around the nucleus but a precise energy level. The accessible energy levels are even discontinuous. They are said to be quantified (see the animation Energy Level Diagram). All accessible energy levels in a crystal form bundles or bands of energy as in this image (wikipedia). A crystal is perfectly characterized by its energy bands, and they tell us about the behavior of electrons, especially with regard to the material’s ability to conduct electricity.
The quantification of energy levels is clearly visible in the alternation of "permitted" bands (accessible energy levels) and "prohibited" bands (inaccessible energy levels). For a crystal in thermodynamic equilibrium, its electrons naturally occupy the lowest energy levels, which correspond to the electrons closest to the nucleus and chemically inactive.
Among all the electrons present in the crystal, only those located in two bands interest us.
In the case of conductors, there is an overlap between the valence band and the conduction band and each atom of a conductor releases one or more free electrons.
For insulators, there is a forbidden band between the conduction band and the valence band, called "gap" or "bandgap". This gap of several eV (electronvolt) is too large and a tiny number of electrons from the valence band can jump to the conduction band.
There is a third category of materials for which the gap is less than 1.5 eV. For these elements, a single photon in the visible spectrum has sufficient energy to move an electron from the top of the valence band to the conduction band. These are the semiconductors such as silicon (gap = 1.1 eV) or germanium (gap = 0.7 eV). The electrical properties of these materials and their ability to interact with light largely explain why they have become essential in electronics.