Conductivity
In terms of conductivity, materials can be categorised into three categories, conductor, semiconductor and insulator. The conductivity means how easily the material allows the flow of charge and it is measured in seimens per meter (S/m).
Conductor
If a voltage is applied to a conductor, it allows the flow of charge. e.g. copper, silver, gold. Copper is about 10^7 S/m. The flow of current is only due to the flow of electrons.

Insulator
An insulator hardly allows any flow of charge when a voltage is applied, e.g. wood which is about 10^(-14) S/m

Semiconductor
Semiconductor materials are most commonly made using silicon, it is an element with 14 protons and 4 valance electrons.

When silicon combines to form a solid, it arranges itself in the pattern of a crystal. By sharing electrons with the surrounding silicon atoms, it forms the covalent bond.

Due to the thermal energy, the atoms in the silicon crystal start vibrating. This vibration provides some of the electrons with enough energy to break these covalent bonds and act like a free electron.

Once an electron becomes free, the vacancy at the particular position becomes a hole. The hole has a positive charge of 1.6 * 10^(-19) Coulomb. At a given temperature, there are equal numbers of holes and electrons are created in this silicon structure.
Intrinsic Semiconductor
An intrinsic semiconductor is a pure semiconductor without any kind of impurity atoms, e.g. silicon crystal.
Extrinsic Semiconductor
In an Extrinsic semiconductor, the external impurities are added to change the conductivity of this semiconductor. By changing the conductivity, we can control it to behave in a specific way.
P-Type Semiconductor:
The trivalent atoms are added with the silicon atoms to form P-type semiconductors. Trivalent atoms are atoms that have three electrons on the outermost orbit, e.g. boron.

Three of the electrons are shared with the neighboring atoms and one vacancy remains in the outermost orbit. Due to this vacancy, the hole is created in the silicon structure. These trivalent atoms are also known as the acceptor atoms because each hole can accept external free electrons.
Since there is an excessive amount of holes in P-type semiconductors, the electrons will be the minority carriers while the holes will be the majority carriers. This means that whenever voltage is applied to it, the majority of the current we get is because of the holes.
N-Type Semiconductor
The pentavalent atoms are added with the silicon atoms to form an N-type semiconductor. Pentavalent atoms are atoms that have five electrons on the outermost orbit, e.g. phosphorous.

Four of the electrons are shared with the neighboring atoms and one electron will act as a free electron, it can roam around the crystal structure. These pentavalent atoms are also known as the donor atoms.
Since there is an excessive amount of electrons in the N-type semiconductor, the electrons will be the majority carriers while the holes will be the minority carriers. This means that whenever voltage is applied to it, the majority of the current we get is because of the electrons.