Unregulated power supply
The most frequently encountered species is the "wall wart". Here we see one grazing in its natural habitat:
This contains a transformer to convert 120VAC to lower voltage AC, a bridge rectifier to convert that to massively fluctuating DC, and a capacitor to smooth out and average the DC to some usable value.
The actual voltage out depends on the load it's powering. Around it's intended load, it will be around the voltage marked on the case, more or less. Load it too much and the voltage drops, load it very lightly (or not at all) and the voltage can go 30% or more higher
than its rated output.
Consequently, equipment powered by this often has a regulator, which steps the power from the "wall wart" down to an even lower, but much more constant voltage. See below.
Regulated Power Supply
There are two main species: linear and switching.
Linear power supplies
reduce a higher and possibly fluctuating DC voltage to a lower and constant DC voltage. This is what I mentioned above. It functions by turning all the excess voltage to heat, which must be dissipated, and isn't very efficient - especially if the voltage differential is large. But they can be very simple and cheap, even consisting of just a single electronic component; like this one, which is about 0.3" wide:
Switching power supplies
are a much more complicated beast, with many subspecies. Depending on design, they may be powered from AC or DC.
From a non-electronics standpoint, think of trying to maintain a constant speed on a bicycle. When you go too slow, you pedal; if you reach or exceed your desired speed, you stop pedaling and flywheel.
The switching power supply performs a similar feat tens of thousands
of times a second by closing an electronic switch between the input and output to "pedal" and raise the output voltage, or closing it and letting the "flywheel" run to let the output voltage drop.
Switching power supplies can be very efficient, especially compared to linear ones. They produce little heat and waste little electricity.
They're everywhere. There's a big fancy one powering your computer. Many consumer electronic devices use external ones, and they typically look like this:
Though some of the newer ones have advanced in miniaturization to the point where they resemble unregulated wall warts.
That's the basics. Let me know if you need more specific details on anything.