To build an electromagnet, you should follow these steps:
1. **Wrap a wire around an iron or steel core at least ten times**: This creates a coil of wire around the core, which is crucial for generating a magnetic field when an electric current flows through the wire.
2. **Attach one end of a wire to a battery, and attach the other end of the wire to an iron or steel core**: By connecting one end of the wire to the positive terminal of the battery and the other end to the core, you create a circuit. When the battery is connected, an electric current flows through the wire, turning the iron or steel core into a magnet - an electromagnet.
By following these steps, you can successfully build an electromagnet that demonstrates the relationship between electricity and magnetism.