This component i found in my digital clock, and is directly attached to the AC powerplug.
How is it called ,and how does it work? Preferably with a link to some site
The transformer is used in your device to transform the mains voltage 100v or 220v to a lower AC voltage, then this voltage is rectified by a diode bridge and capacitors and powers the DC circuit of the device.