The basic principle of a transformer is electromagnetic induction.
When an alternating voltage V1 is applied to the primary, an alternating current starts flowing through the primary winding. This result, an alternating current set up in the core. This alternating flux when links own turn (primary winding), an emf E1 is induced in the primary winding. The direction of this emf is opposite to the applied voltage, according to the Lenz’s law.
The alternating flux also links with the secondary winding, an emf is induced secondary winding is called mutually induced emf.
The induced emf in the primary and secondary winding depends upon the rate of changed of flux linkages. The rate of change of flux is the same for both primary and secondary winding. Therefore the induced emf is directly proportional to the number of turns of the primary winding and in secondary is proportional to the number of turns of the secondary winding.