
If
you want to find out more about the way electric fields behave in the boundary
layer between n-type and p-type materials, and what is meant by doping, have a
look at the excellent site http://electronics.howstuffworks.com/diode.htm
We
have here a p-n junction.
A bipolar transistor consists of two p-n junctions back to back like this:

The
arrows represent conventional
current flowing from positive to negative. Semiconductors are doped so that some
have an excess
of electrons, n-type
material, while others have a deficiency
of electrons called holes.
These are found in p-type
materials.
Transistors
conduct when the base-emitter voltage is about 0.7
V. Transistors are current controlled devices. The bigger the
base emitter current, the bigger the collector emitter current.
The transistor can be used as an amplifier or a solid state switch.