Three methods of producing magnetic field are as follows:
1.Magnetic field can be produced by placing a permanent bar magnet or a horse-shoe magnet at the place, where magnetic field is required.
2.Magnetic field is produced around a current-carrying straight conductor or a current carrying circular coil.
3. A very good method to producemagnetic field is due to flow of current in a solenoid.