Think about my question, which you didn't answer.
Atoms are electrically neutral because they have the same number of electrons as protons.
Atoms can combine together to form molecules, which are also electrically neutral.
Atoms combine by sharing electrons in some way within the molecule.
This is called chemical bonding.
Protons are not shared although they belong to the molecule.
Usually only small percentage of the total electrons are shared. Can you think of any exceptions?
A typical example would be two oxygen atoms both with 8 electrons and 8 protons combining to form a neutral molecule with 16 electrons and 16 protons.
Of these 16 electrons 4 are shared.
With oxygen only two atoms are needed to make a complete molecule. Some elements can combine or chemically bond together in much larger numbers to form large lumps of solid. We don't call these lumps molecules because the number of atoms can vary enormously, unlike oxygen which is fixed at two.
They are however chemically bonded aggregates with electron sharing in the same manner.
And they are electrically neutral.
An element such as gold, has 79 electrons of which 8 can be shared in the solid to form the metal lump we see.
Other elements such as carbon can share 4 electrons to form the solid diamond.
The difference between solid is that diamond is an electrical insulator, whereas gold is an electrical conductor.
Good electrical conduction is one of the properties of metallic elements. They conduct because some of the shared bonding electrons can break free of a particular atom and move freely around the solid.
This movement is called electron drift and answers the second part of your question.
Remember that the solid is still electrically neutral overall.
These free electrons normally move in no particular direction on average. However when a voltage is applied (which pushes them in one particular direction) they carry the electric current in metals.
Diamond has no such free electrons, which makes it an insulator.
Yet other elements such as germanium and silicon have some free electrons, but not as many as metals.
These are semiconductors and their ability to conduct electricity is markedly less than for metals.
So far I have only mentioned single elements but different elements also combine together to form molecules, metallic aggregates and semiconductor aggregates.
These combination too are electrically neutral because when they combine there are the same number of electrons and protons.
Examples would be:-
molecules : carbon dioxide;
metallic : aggregates brass : (zinc - copper alloy);
insulator : silicon dioxide (glass);
semiconductor : gallium arsenide.
Once again they are electrically neutral.
These would all be combinations in definite proportions so for example every silicon atom is joined to the same number of oxygen atoms.
So far I have talked of the total number of electrons but all the action takes place via the shared electrons alone.
So what follows will be about shared electrons only.
So long as we remember that each of these shared electrons is electrically balanced by a proton to maintain neutrality whether it is free as in a metal our not as in an insulator we will be OK.
All the semiconductors so far are intrinsic semiconductors and N type.
If, however, we introduce only a small proportion a second element we can obtain different properties.
If we replace a few of the atoms of the semiconductor (say germanium or silicon with 4 shared electrons) by an atom having one less shared electron (boron or indium with 3) we obtain the P type semiconductor you asked about.
The P refers to the fact that there is one fewer shared electron since the impurity has one less to offer.
However the impurity also has added one fewer proton to the aggregate so maintaining electrical neutrality.
Yes we call the missing electron a ‘hole’ and calculate as though it were a real positive charge because that makes the maths easy, but the overall aggregate is still electrically neutral.
As well as decreasing the supply of electrons we can also increase them by a similar process, but with an atom that has more electrons (and more protons) eg arsenic with 5.
This enhances the N type effect, but as additional protons have also been added the material remains electrically neutral as before.