How An Electromagnet Is Made