step: an electromaget is formed when a wire is looped around an iron nail and is connceted to a circuit & electromagnets generate magnetic fields
inference: a magnetic field will be generated when a wire is looped around an iron nail and is connected to a circuit