is the magnetic field produced inside the soft iron core aligned with
the magnetic field produced in the primary coil, or does it oppose it?
A conductive (iron) transformer core has both diamagnetic (excludes magnetic field) and ferromagnetic (enforces magnetic field) properties.
For a microsecond or ten after the primary current is established,
the B field in the core is low, because eddy currents in the iron oppose the applied H
field. After 1000 microseconds, those eddy currents have died
out, and the iron magnetization reinforces the magnetic induction
provided by the primary winding.
$$B \simeq \mu * H$$
Many thin laminations, rather than a solid iron block, makes a
core that magnetizes more quickly (and helps energy efficiency),
because it minimizes that changeover time. Lenz's law applies
both to the eddy currents, and to the secondary currents, but does
not relate directly to "the" magnetic field. The B field comes from the
sum of those currents and the iron magnetic polarization, and isn't a simple superposition of parts,
because magnetization of iron is not linear. That constant "mu"
in the equation is ... not exactly a constant.
My text book says that 'when the secondary current is on, the magnetic
field it creates is in the opposite direction to the magnetic field of
the primary current.
There is some truth in that statement, because secondary current has
the effect of reducing the magnetization of the iron, and at low
magnetization, the system IS linear. Still, 'the magnetic field'
ought to mean the B field, inside the core, and not some theoretical
H field due to part of the nearby currents. That B field is
composed of induction by two (or more) transformer windings, and by
eddy currents, and by the ferromagnetic polarization.
While you can add the H field sources, it is not valid (because of
polarization) to confuse that sum with the B field in the core. The
polarization is not linear, and that fact will cause nonideal
behavior of the transformer, which should NOT be ignored.
Best Answer
For a stationary conductor the EMF is caused entirely by electric fields. What happens is there are always electric fields when magnetic fields change. The induced electric fields and the changing magnetic fields have a common cause.
For a moving conductor in an unchanging magnetic field, the EMF is caused by the magnetic field exerting a force on moving charges.
For a moving conductor in a changing magnetic field, the EMF is caused by both electric and magnetic forces.
For your examples you need to look at whether things are moving and whether fields are changing. And whatever causes those things are ultimately responsible.