How to create electromagnets.