When alternating voltage is connected to the primary side, a small current called magnetizing current will flow and an alternating magnetic field is set up in the core, this alternating field links with the secondary winding by mutual induction and an emf is produced. So with DC we can't have an alternating magnetic field that will link our windings, coz our voltage is direct isn't alternating