5v Power Supply Tutorial
This is the schematic for a typical 5V power supply:
Some comments:
The 12V AC input from the transformer is rather high. The rectifier + smoothing capacitor will level the voltage at the peak value; \$\sqrt{2} \cdot V_{RMS}\$, though you have to subtract 2 diode drops from the rectifier, about 1V per diode. So
\$ V_{IN} = \sqrt{2} \cdot 12V - 2 \cdot 1V = 15V \$
The 7805 can supply up to 1A, and then the dissipated power is
\$ P_{REG} = (V_{IN} - V_{OUT}) \cdot I = (15V - 5V)\cdot 1A = 10W! \$
That's a lot! Try to keep the dissipation low by having a lower input voltage. This should be at least 8V, then an 8V transformer should be fine. At 1A you'd still need a heatsink.
The smoothing capacitor's value depends on the load. Every half cycle of the mains voltage the capacitor will be charged to the peak value and start to discharge until the voltage is high enough to charge again. A simplified calculation gives
\$ C = \dfrac{I \cdot \Delta T}{\Delta V} \$
where \$\Delta T\$ is half the mains cycle (e.g. 10ms in Europe, 8.33ms in the US). This formula assumes a linear discharge, which in reality often will be exponential, and also assumes a too long time, which often will be 70-80% of the given value. So, all in all, this is really worst case. Based on the above equation we can calculate the ripple voltage for a given current, like 100mA:
\$ \Delta V = \dfrac{I \cdot \Delta T}{C} = \dfrac{100mA \cdot 10ms}{470\mu F} = 2.1V \$
which is OK given the high input voltage. In practice the ripple will probably be around 1.6V. A 1A current, however, would cause a 16V ripple, so you should use at least a 4700\$\mu\$F capacitor then.
edit (re your comment)
Ripple is the variation in voltage which remains after smoothing with the capacitor.
No matter how big your capacitor is you'll always have a certain amount of ripple, though with large capacitors and low power consumption you can reduce it to mV levels.
Image from here
Well typical power supply consists of a transformer follower by a Graetz bridge rectifier, a big capacitor and a regulator and components required for it to work. For the safety side, you'll at least want a fuse on the transformer. If you can get a regulator which has current limiting and short-circuit protection, you'd make life much easier for yourself. There are 7805 regulators with that features, like for example L7805AB from STMicroelectronics. Just be sure to read the datasheet of the exact regulator you have and confirm that it has short-circuit protection and thermal overload protection.
When I was building my own "bench" power supply, I had problems finding a nice tutorial. There are power supply schematics on the Internet, but not many gave me explanations I wanted to hear.
In the end, I managed to find some tutorials which explain how each major component of the power supply works made by Youtube user "Afrotechmods".
Here's a tutorial on transformers.
Here's a tutorial on diodes and rectifiers.
Here's a tutorial on regulators.
I haven't been able to find a nice tutorial on safety, so I can't recommend anything.
Also be sure to expect components to fail (even the non-obvious ones, like cables) and know what to do when they do. Having a small fire extinguisher nearby may prove to be useful. It saved me once.
EDIT: This answer from Endolith seems to have a schematic of a complete 7805 based linear power supply, if that's what you're looking for.