In a transformer the ratio of the primary and secondary voltages equals the ratio of their turns, the currents stand in the inverse ratio, and the power is unchanged. From the two voltages and the primary turns, this finds the secondary turns.
A transformer changes voltage using two coils wound on a shared iron core. The ratio of the primary and secondary voltages equals the ratio of their turns.
Here is voltage, the number of turns and current, with subscript 1 for the primary side and 2 for the secondary. Voltage and turns stand in the same ratio; the currents, and this is the point to hold on to, stand in the inverse one.
The currents invert because the power entering equals the power leaving. Since , lowering the voltage raises the current in proportion. A transformer changes voltage; it does not manufacture power.
With a primary at 100 V, a secondary at 12 V and 400 turns on the primary, the secondary needs 48 turns.
The ratio is 100 ÷ 12 = 8.33, and dividing the 400 primary turns by it gives 48. Draw 2 A from the secondary and the primary carries 2 ÷ 8.33 = 0.24 A, with 24 VA passing on either side.
This treats the transformer as ideal and lossless. Real cores and windings lose something, giving efficiencies of about 95 to 99 per cent, and the secondary voltage sags a little once current is drawn.
None of this works on direct current. Without a changing magnetic flux, no voltage is induced in the second coil at all.