Electrons are fermions, which mean that no two electrons may have exactly the same state. This statement is called Pauli Exclusion Principle.
Each atom has discrete energy levels which may be occupied by electrons (in fact, the correct statement will be that electrons in the atom can have discrete values of potential energy). These discrete potential energy levels represent atom's Orbitals.
Imagine some atom being ripped of all its electrons (a nucleus). When the first electron is returned to the atom, it occupies the least energetic state available. When the second electron is returned to the atom it can not have the same state as the first one. It seems like this electron must occupy the second lowest energy level, however electrons have "spin". Two electrons may occupy the same energy level in the atom if they have different spins (therefore their state is not the same). This is the reason why the lowest orbital can accommodate two electrons - one having "spin up" and other having "spin down".
We won't discuss why the second orbital may be represented as four sub-orbitals and can accommodate a total of 8 electrons - this requires a quantum mechanical analysis which is not directly related to your question.
Now, suppose that you brings two Na atoms close together. They have exactly the same number of electrons at exactly the same orbitals. However, non-valence orbitals are filled by the maximum number of electrons which accommodate all allowed electronic states in the atoms. This should lead to existence of pairs of electrons having exactly the same states in these atoms, right? No, the Pauli exclusion principle is not broken here. What happens is that due to electrons' interactions, each orbital is being split - the corresponding orbitals in these atoms change their energies a bit, leading to creation of two orbitals having slightly different energies. The difference between new orbitals' energies is called covalent energy.
When you add third atom to the existing two, the orbitals split once more, and the covalent energy reduces. The process continues with each additional atom. By the time you have a macroscopic cluster of Na atoms, each orbital was split a huge number of times and the covalent energy became exceedingly small - the energy levels of orbitals became indistinguishable from each other (the separation is well below measurement limit of any existing technique).
In this case there is no more reason to treat each altered energy level of a particular orbital separately, and the notation of "bands" come in handy. Energy band represents all energies of (initially) the same orbital. The electrons may transit freely between energy levels in the same band.
Bands are formed for each orbital of the element. The number of bands is equal to the number of orbitals in the elementary atom of Na.
Pauli exclusion principle still applies, therefore the number of electrons in a single band has an upper bound. Electrons tend to occupy the lowest energy bands first. When there are no more electronic states in a band, any additional electron will occupy the next energy band.
The energy level of the most energetic electrons in a material (material, not atom anymore) is called Fermi level (this definition is a bit simplified, but correct in general). All the electronic states below Fermi level will be occupied by electrons, and all the states above will be empty.
The highest energy band which is completely filled with electrons is called Valence Band. The lowest energy band which has unoccupied electronic states in it is called Conduction Band.
The last piece of information we need in order to understand the distinction between conductors, semi-conductors and insulators, is that an energy band which is full with electrons (valence band is one of them) can not carry current (i.e. electrons in this band can't contribute to current flow). The explanation for this is again a bit tricky, therefore just get this fact as granted (and you are welcome to find additional info on the Web). Completely empty band can't contribute to current too because there are no electrons which can gain energy in it at all.
Conductors
Conductors are characterized by overlapping valence and conduction bands (otherwise stated: Fermi level lies inside conduction band of conductors, and this band is partially filled with electrons). Valence electrons can freely transit to higher energy states in the conduction band, therefore applied voltage will cause their drift - electrical current.
Insulators
Insulators are characterized by Fermi level lying in between valence and conduction band. Valence band is therefore full and its electrons can't contribute to current. Conduction band is therefore empty and there are no electrons which can contribute to current at all.
Does this mean that an insulators can't conduct current at all? Well, no. It means that if you want to see current flow in insulator, you must transfer huge energy to electrons in order to transit them from valence band into conduction band (the energetic separation between these bands is called band gap).
Semi-conductors
Semi conductors have the same band structure as insulators, with Fermi level lying inside the band gap. The only difference is that the band gap of semiconductors is relatively small, which allows for low energy transitions of electrons from the valence band into the conduction bands. The energy for this transition may be gained from electrostatic energy, optical energy, heat energy etc...
Yes, semiconductors are just bad insulators :)
Hope this clarifies the energy bands concept.
Consider your equation
$$\frac{P}{Ka}\sin(Ka) + \cos(Ka) = \cos(ka) \, .$$
The right hand side can only ever attain values in the range $[-1,1]$.
Therefore, if there is an energy $E$ which causes the left hand side to take a value outside the range $[-1,1]$, then that $E$ can never be realized for any value of $k$.
In other words, that $E$ is forbidden and we say it sits in a "band gap".
We can see this graphically.
Here I plot the energy $E$ versus the value of the left hand side of the equation for the case
$$a=1, \quad b=10^{-4}, \quad U_0=10^4 \,.$$
The vertical blue line indicates the point at which the left hand side of the equation is $-1$.
Any points where we go to the left of that line are forbidden.
The red band indicates the range of $E$ over which the left hand side of the equation is outside the range $[-1,1]$.
As you can see, there is a band of values of $E$ where no possible $k$ can satisfy the equation.
This is a band gap.
Best Answer
If you consider a single energy level in an atom, e.g. the $1s$ state of hydrogen, then if you bring two atoms together the level will split into two states (often called the bonding and anti-bonding orbitals). If you bring in a third atom the two states will split again giving four states, and so on. Grouping $n$ atoms will split the original distinct level into $2^{n-1}$ levels.
The number of atoms doesn't have to be very big before the the spacing between all these levels is far less than $kT$, and at that point we have a band i.e. effectively we have a continuous range of energies available to electrons.
So the bands, and therefore the band gaps, arise due to bringing many atoms together, not just two.