How do mobile phone chargers produce regulated voltage?
Phone chargers are indeed usually a 5 V regulated power supply.
Here's an example of a simple circuit that is commonly used:

Source.
This is a flyback converter circuit.
The output voltage is regulated even though it's not immediately obvious how that's done. But note the winding &quot;Na&quot; on the left, it is one of the transformer's windings.
This winding supplied power to the IC and at the same time the voltage across this winding is coupled (through the transformer) to the voltage at winding &quot;Ns&quot; which feeds the output.
The IC has a feedback loop where is measures the voltage at winding Na (voltage Vaux) and regulates the on/off switching of the transistor connected to the DRV output of the IC, such that the voltage Vaux has a certain value. When that is done, the output voltage will also be fairly constant (it does not need to be exactly 5 V, up to 5.5 V is allowed, usually, in a good design).
There is indeed no zener diode in this circuit but there usually will be a &quot;bandgap circuit&quot; inside the IC. A Bandgap circuit can provide a reference voltage that is almost constant over temperature. On-chip Zener diodes do exist so that could be used as well. This circuit (or the zener diode) will provide a constant voltage that is used as a reference voltage to regulate the output voltage.

why can't we simply provide a 4.1 volts input to batteries instead of using 5 volts

Because the battery charger circuit needs to:

know the temperature of the battery

know at what current the battery should be charged (note that this current varies with the battery's charging state, when the battery is almost empty or almost full, the charge current needs to be limited).

know the type (Chemistry) of the battery so that the &quot;stop charging&quot; voltage is known and correct.


Because of this the charge controller cannot be in the supply, it has to be in the device (phone). Also having the charge controller in the device means you can charge it from any 5 V USB output which is convenient.