In solid-state electronics, using the proper types and amounts of dopants in semiconductors is what produces the p-type semiconductors and n-type semiconductors that are essential for making transistors and diodes.
The addition of a dopant to a semiconductor, known as doping, has the effect of shifting the Fermi levels within the material.