I have a 5 V 3 A SMPS which says that it can take input voltages between 100 V and 240 V AC and frequencies between 50 Hz and 60 Hz.

* How do these work?
* How can they take such a large range of input voltage and provide a constant output voltage and current?

I know the basic working of the SMPS Technology. But all the articles I read suggest a fixed DC input voltage to produce a desired voltage below this input. How can such a wide range AC produce a fixed DC input voltage to the SMPS IC?