Semiconductors are substances that can conduct electricity under some conditions but not others. They have resistivity between metals and insulators. There are two types - elemental semiconductors consisting of a single element like silicon or germanium, and compound semiconductors consisting of multiple elements like indium phosphide. In semiconductors, energy levels split into permitted energy bands separated by a forbidden energy gap when atoms are close together. The valence band is filled with electrons and the conduction band above it is empty or partially filled, with a gap between them through which electrons need energy to move.