Q1: The zener D2 limits the voltage to approximately 5.1V. The excess voltage (and power) is dissipated in R1.
Q2: The voltage is only reduced by the rectifier diodes. The 50Hz input could be from a transformer or it could be from mains power. 50Hz implies it is European standard so mains voltage is 230V RMS and peak voltage over 300V
Q3: The AC voltage input could be 110 / 230V straight out of the mains plug or it could be stepped down with a transformer.
If you are going to play around with any of these USE A TRANSFORMER. If developing a transformerless power supply get an isolation transformer. Mains voltage can injure or kill you.
In the first circuit, the impedance of the capacitor, as well as the resistor reduces the voltage (depending on the current drawn). It is a very dangerous circuit, especially if the capacitor shorts out.
I managed to get this out of a UPS unit but I realized I have no data for it. What do you recommend? That I get a transformer specifically made for 120vac down to 5V?
Don't buy ultra-cheap mains supplies, unless you know that the brand is reputable. Very cheap may imply
cheap unsafe knock-offs or unbranded. Unsafe mains supplies risk injury/death/fire.
The sort of capacitive-dropper circuit as in the first example is only permissable for something that is completely
self-contained and insulated - any power supply with an output connection should be completely isolated (and
preferably earthed).
A zener diode is kind of like an overflow drain in a sink. The water rises up to that level, then no higher, any extra water overflows down the drain.
An ideal zener diode has a fixed voltage drop. The top of the zener will always be 5.1V.
In the non-ideal real world the biggest thing you need to worry about is overheating the zener diode. In this case the 10K R1 will limit the current.
Real zeners are not ideal so the voltage will change a little when the current changes and also as the temperature changes, but in general you can assume the output voltage will be around 5.1V.