In an electromagnet the wires get hot due to the flow of what?

Electric current