This animation shows the principle of operation of the transformer.
The number of turns on both the primary and secondary coils affects the output voltage of the transformer.
The ratio of the output voltage to the input voltage is the same as the ratio of the number of turns on the secondary to the number of turns on the primary.
If the number of turns on the primary is greater than that on the secondary then the voltage on the secondary will be less than that on the primary. This arrangement is called a step-down transformer. If there are more turns on the secondary than on the primary the output voltage will be larger. This arrangement is a step-up transformer