A semiconductor is generally a crystalline solid material that can conduct electricity under certain controlled and preferred conditions. Over time since discovery, semiconductors have become an important integral part of electronics production because they are ideal for controlling the flow of electrical current in electronic devices.
A semiconductor is a substance, typically a solid chemical element or compound that has specific electrical properties and conducts electricity under certain conditions. This makes it ideal for controlling electric current in electronic devices and appliances. Any substance that can conduct electricity is called a conductor while one that cannot conduct electricity is known as an insulator. Semiconductors have properties that are halfway between the conductor and insulator.
Semiconductors can be pure elements, such as silicon or germanium, or compounds such as gallium arsenide or cadmium selenide. During a process called doping, small amounts of impurities are added to pure semiconductors to effect large changes in the conductivity of the material. So, the specific properties of a semiconductor is determined by the dopants or impurities added to it.
Theoretically, metals and conductor materials have a band structure where the valence band overlaps with the conduction band, as a result of which metals can easily conduct electricity. On the other hand, insulators have a pretty large bandgap between the valence band and the conduction band, so it is difficult for electrons to get into the conduction band.
In contrast, semiconductors possess a thin gap between the valence and conduction bands. When the temperature is raised, electrons can get enough energy to travel from the valence band up to the conduction band. Eventually, the electrons are able to enter the conduction band, and the semiconductor can conduct electricity.
Unlike conductors, the charge carriers in semiconductors arise only because of external thermal energy. It causes a certain number of valence electrons to cross the energy gap and jump into the conduction band, leaving an equal amount of unoccupied energy pockets, which are called holes. Conduction due to electrons and holes are equally important.
Streamlined features of semiconductors are listed below:
Semiconductors are like insulators at Zero Kelvin. But when the temperature is increased, they work as conductors.
Due to their unique electrical properties, semiconductors can be modified through doping to make semiconductor devices suitable for energy conversion, switches, and amplifiers.
They offer lesser power losses.
They are smaller sized and possess less weight.
Their resistivity is higher than conductors but lesser than insulators.
The resistance of a semiconductor material decreases with the increase in temperature and inversely increases with a decrease in temperature. 
The discovery and development of semiconductors follows from the first time a semiconductor effect was observed in 1833, although the term “semiconducting” had been previously used by Alessandro Volta in 1782.
Faraday observed that the electrical resistance of silver sulfide decreased with temperature. Then in 1874, Karl Braun discovered and cataloged the first semiconductor diode effect. Braun observed that current flows freely in just one direction at the contact between a metal point and a galena crystal.
1901 saw the discovery of the very first semiconductor device called "Cat Whiskers", invented by Jagadis Chandra Bose. Cat whiskers was a point-contact semiconductor rectifier used to detect radio waves.
The invention of the transistor (a device composed of semiconductor material) came up in 1947 by John Bardeen, Walter Brattain, and William Shockley, at Bell Labs.
The semiconductor itself is not an invention but there are many inventions that are semiconductor devices. The discovery of semiconductor materials allowed for incredible and vastly significant advancements in the electronics industry. Semiconductors were vital for the miniaturization of computers and computer parts, and also for the manufacturing of electronic parts such as diodes, transistors, and many other devices. 
1. Intrinsic Semiconductor
An intrinsic semiconductor is one which is made of the semiconductor material in its greatly pure form.
Because of this, it possesses a very low conductivity level since it has very few number of charge carriers, namely holes and electrons, which it contains in equal quantities. Therefore, an intrinsic semiconductor may also be defined as one in which the number of conduction electrons is equal to the number of holes.
Germanium (Ge) and Silicon (Si) are the most common type of intrinsic semiconductor material, having four valence electrons (tetravalent) and bound to the atom by covalent bond at absolute zero temperature.
When there is an increase in temperature, few electrons become liberated to move through the lattice, thereby creating a positively charged hole in its original position. These free electrons and holes contribute to the conduction of electricity in the semiconductor. Hence, semiconductor current consists of movement of holes and electrons in opposite directions in the valence and conduction band respectively.
2. Extrinsic Semiconductor
An extrinsic semiconductor is a semiconductor doped by a specific impurity which is able to modify its electrical properties. They are created when a measured and controlled amount of chemical impurity called dopant is added to intrinsic semiconductors, increasing conductivity and making it suitable for electronic applications such as diodes and transistors or optoelectronic applications such as light emitters and detectors. 
Extrinsic semiconductors can be further classified into N-type Semiconductor and P-type Semiconductor.
Recommended reading: Silicon Wafers: Everything You Need to Know
The P-type Semiconductor is formed when a trivalent (having three valence electrons) impurity such as Gallium and Indium is added to a pure semiconductor in a small amount, and as a result, a large number of holes are created in it. These p-type producing impurities are known as Acceptors because each atom of them creates one hole which can accept one bonded electron. A positive charge hole is created when the three valence electrons of the impurity bond with three of the four valence electrons of the semiconductor and having one electron short, the covalent bond cannot be completed, hence the missing electron is known as a hole.
An extremely small amount of impurity has a large number of atoms, therefore, it translates to millions of holes – which are the positive charge carriers – in the semiconductor. Hence, it is called p-type semiconductor where 'p' stands for positive.
In this semiconductor, the majority charge carriers are holes whereas minority charge carriers are electrons. The density of the hole is higher than that of the electron, and the acceptor level mainly lies closer to the valence band.
The N-type semiconductor is described as a type of extrinsic semiconductor doped with a pentavalent (having five valence electrons) impurity element. The pentavalent impurity or dopant elements are added in the N-type semiconductor so as to increase the number of electrons for conduction.
Examples of pentavalent impurities include Phosphorus, Arsenic and Antimony. The impurity is added in very little quantity in the N-type semiconductor such that the crystal integrity of the base intrinsic semiconductor is not disturbed. The atom of the pentavalent impurity makes covalent bonds with four silicon atoms leaving one electron not bonded with any silicon atom. Each pentavalent impurity atom is said to donate one electron to the N-type semiconductor hence it is called a Donor impurity. Thus, there are more electrons than holes in the N-type semiconductor.
Because of the pentavalent impurity in an N-type semiconductor, a number of loosely bonded electrons populate the lattice structure. As a certain amount of voltage is applied, these electrons gain energy to break free and cross the forbidden gap, leaving the valence band to enter into the conduction band. This results in a very small number of holes being formed in the valence band. The Fermi level (highest energy level an electron occupies at absolute zero temperature) is near the conduction band as more electrons enter the conduction band. 
In determining the difference between p-type and n-type semiconductors, factors such as doping element, effect of doping element, the majority and minority carriers in both types are taken into consideration. Additionally, the density of electrons and holes, energy level and Fermi level, the direction of movement of majority carriers, etc. are also accounted for in clarifying the disparity between p-type and n-type semiconductors. In this vein therefore, the differences are outlined thus:
As a main difference, in n-type semiconductors, the electrons have a negative charge, hence the name n-type. While in p-type, the effect of a positive charge is generated in the absence of an electron, hence the name p-type.
In a p-type semiconductor, the III group element of the periodic table is added as a doping element, while in n-type the doping element is the V group element.
In a p-type semiconductor, the majority carriers are holes, and the minority carriers are electrons. But In the n-type semiconductor, electrons are the majority carriers, and holes the minority carriers.
The electron density is much greater than the hole density in the n-type semiconductor represented as ne >> nh whereas, in the p-type semiconductor, the hole density is much greater than the electron density: nh >> ne.
In an n-type semiconductor, the donor energy level is close to the conduction band and away from the valence band. While in the p-type semiconductor, the acceptor energy level is close to the valence band and away from the conduction band.
The impurity added in p-type semiconductor provides extra holes known as Acceptor atoms, whereas in n-type semiconductor impurity provides extra electrons called Donor atoms.
The Fermi level of the n-type semiconductor rests between the donor energy level and the conduction band while that of the p-type semiconductor is between the acceptor energy level and the valence band.
In the p-type semiconductor, majority carriers move from higher to lower potential, in contrast to the n-type where the majority carriers move from lower to higher potential.
Trivalent impurities such as Aluminium, Boron, Gallium, and Indium are added in the p-type semiconductor, whereas in the n-type semiconductor, Pentavalent impurities like Arsenic, Antimony, Phosphorus and Bismuth are applied. 
For a more simplified representation of the features of the p-type semiconductor and the n-type semiconductor, the following chart is provided.
Factor of Comparison
Group of Doping Element
Group III element is added as doping element.
Group V element is added as doping element.
Effect of Doping Element
Impurity added creates vacancy of electrons (holes) known as Acceptor Atoms.
Impurity added provides extra electrons and is called Donor Atom.
Density of Electrons and Holes
The hole density is much higher than the electron density: nh >> ne.
The electron density is much higher than the hole density: ne >> nh.
Type of impurity added
Trivalent impurity like Al, Ga, In etc. are added.
Pentavalent impurity like P, As, Sb, Bi etc. are added.
Between acceptor energy level and the valence band, and closer to the valence than conduction band
Between donor energy level and the conduction band, and appears closer to the conduction band than the valence band.
The acceptor energy level is close to the valence band and away from the conduction band.
The donor energy level is close to the conduction band and away from the valence band.
Movement of Majority carriers
Majority carriers move from higher to lower potential.
Majority carriers move from lower to higher potential
Holes are majority carriers
Electrons are majority carriers
Electrons are minority carriers
Holes are minority carriers
The unique properties of semiconductors make them flexible and thus extremely useful for electrical conductivity, which is a major element of electronic devices and appliances. The existence of the n-type and p-type semiconductor is testament to this flexibility, offering electronics manufacturers and consumers a wide range of utility.
1.Tech Target. What is a Semiconductor and what is it used for? 2022 [Cited 2022 Jul 11]. Available from: https://www.google.com/amp/s/www.techtarget.com/whatis/definition/semiconductor%3famp=1
2. Electronic Notes. What is a Semiconductor? 2022. [Cited 2022 Jul 11] Available from: https://www.electronics-notes.com/articles/basic_concepts/conductors-semiconductors-insulators/what-is-a-semiconductor.php
3. Electronics Desk. Difference Between Intrinsic and Extrinsic Semiconductor. 2022. [Cited 2022 Jul 12] Available from: https://electronicsdesk.com/difference-between-intrinsic-and-extrinsic-semiconductor.html
4. Embibe. Extrinsic Semiconductor: Types, Energy Bands & Applications. 2022. [Cited 2022 Jul 12] Available from: https://www.embibe.com/exams/extrinsic-semiconductor/
5. Linquip Technews. Differences Between P-Type and N-Type Semiconductor. 2021. [Cited 2022 Jul 12] Available from: https://www.linquip.com/blog/differences-between-p-type-and-n-type-semiconductor/?amp=1