Transformers are one of those topics that are nominally covered in first-year E&M but which often get dropped for lack of time...
The relation can be derived from Faraday's law: induced voltage is proportional to rate of change of magnetic flux through a coil. In coil 1,
, where
is the magnetic field through one turn and
is the number of turns (you multiply by the number of turns to get the total magnetic flux threading through the coil).
Now we assume that the magnetic field is the same in the other nearby coil, so
the flux through one turn is the same on the other side. Then we write
, and combining the two expressions we get
.
Qualitatively, a changing current on one side of the transformer creates a changing magnetic flux on the other side, which in turn creates an induced voltage there. The relative amount of flux through the secondary coil and hence the induced voltage can be controlled by the turn ratio.