This applet try to illustrate how the transformer (without load) works.
The input voltage Vin will produce current flow in the primary coils (left blue circles).
Magnetic field are generated from current in the primary coils. (yellow lines represent magnetic field lines).
The change of magnetic flux in the secondary coil will induce electromotive force (output voltage in the secondary coils).
You can change number of primary/secondary coils from the slider at either side.
The period of the sinwave (voltage) can be changed with slider,too!