To expand a bit on the actual mechanics of a diode laser, electricity causes something called
population inversion of the electrons, and this is the critical part of
stimulated emission (la
ser).
Basically, the semiconductor material works almost identically to LEDs except for the fact that the electrons in the material will hang around in an excited state while the bandgap (caused by two semiconductors) is charged. This makes a laser diode's bandgap into both an LED and a
gain medium.
Light is emitted by electrons changing their levels, and the population inversion puts all of the electrons in the medium into a high state that only allows them to fall when hit by an incoming photon. The fall that these electrons undergo usually involves the same amount of energy as the semiconductor badgap, so the LED and stimulated emission produce the same wavelength of photon. This is where the mirrors come in to make a laser.
The mirrors force light through the gain medium in roughly one direction. Because of this, some photons bounce back and forth through the diode, forcing more photons to be emitted in the same direction and so forth. What comes out of the emission end(s) is a large amount of highly directional light that is also quite coherent (same wavelength/frequency).
This electrical pumping is also roughly the same case with most gas lasers without the semiconductor part.
Really, pumping a laser just means causing a population inversion of electrons which can be caused by electricity, light, heat, chemistry, and a lot more physical processes that involve electric charges.
Edit: It admittedly is a lot more complicated than that, but I'm uncomfortable taking it too far since I'm not done with my E&M/quantum physics until next year. Plus, it's summer break

.