How semiconductors work
Semiconductors are a very important and essential piece of technology when it comes to our modern electronics. Replacing vaccuum tubes and significantly furthering the ability of relatively new fields such as computing and the world of communications as well as improving their reliablity and cost, semiconductors truly are the 'soul of electronics'.
A semiconductor is any material that has the ability to conduct a small amount of electrical current. Many basic electronic components contain these semiconductive materials, such as diodes, transistors and photovoltaic cells. You'll often find silicon, gallium or arsenide being used to perform this role.
This is due to the electron structures of these elements which allow them to be in basically what could be called the 'goldilocks zone' when it comes to conducting electricity. You may be familar with the idea that metals are generally a 'good' conductor of electricity. This is due to atoms of metallic elements being binded to together by a sea of electrons, allowing electricity to be able to pass through the metal compound with ease with little reduction to its own properties such as voltage or current. This is because the free electrons 'assist' the electrical charge in traversing through the metal. The more free electrons their are, the more easily the electrical charge can pass through the metal. However their are 'bad' conductors of electricity as well which are not the same as insulators which effectively stop the electricity passing through it altogether.
Materials that are considered to be bad conductors still pass electricity, however, the electricity does not come out the same as it entered. The electricity's voltage, current and other properties are reduced by a large margin, becoming much smaller than to what it was before. As mentioned above, semiconductors are neither of these. They, as their name suggest, are neither good at nor bad at conducting electricity. They are in the middle of the road when it comes to conducting electricity.
This is because the atoms of all semiconductor materials, like silicon, arsenide and gallium all have four electrons in their outermost orbit (the valence shell). This allows these atoms to form single convalent bonds with other atoms of (in this case) the same element. Allowing the atoms to create a overall lattice shape.
This is especially useful because it means we can easily control the amount of electricity, and more specifically, the amount of current that passes through a circuit, by simply adding or removing impurities. As the introduction of a small amount of 'impurities' (such as boron) causes this lattice to become unstable, producing free electrons. Increasing the amount of current that is able to pass through the semiconductor. The entire relationship can be described as so:
Increased amount of impurities (known as 'doping') -> Increase in free electrons in the lattice of the semiconductor -> Increased in the amount of current that is able to pass through to the rest of the circuit
With the use of modern manufacturing techniques, we are able to manipulate the state of the semiconductor both during manufactoring and whilst the semiconductor is in use via electricity, magnetic fields, light or heat exposure.