A student passes an electric current through a thin metal wire. They notice that the wire becomes warm.
Explain why the wire becomes warm.