In a transformer, let's say we have:
<br>I1, I2 - currents through the primary and secondary winding
<br>V1, V2 - voltages
<br>N1, N2 - number of turns
<br>F1, F2 - magnetic fluxes through core, produced by the currents I1 and I2 (they are opposing...)
<br>R - the reluctance of the core

We have V1/V2 = N1/N2 = I2/I1.
<br>F1=N1*I1/R; F2=N2*I2/R
<br>I think I1 and I2 are in phase too.
<br>That means F1 and F2 are practically equal.
<br>
How can we have a nonzero resulting flux through the core? 
F=F1-F2
<br>
<br>[Transformer][1]
  [1]: https://en.wikipedia.org/wiki/Transformer#/media/File:Transformer3d_col3.svg