This phenomenon is due to the fact that an alternating current flows through the copper tube, which generates a magnetic field inside it in constant change of polarity.
Due to the continuous change of orientation in the field, the magnetic domains of the introduced metal oscillate continuously in response, generating a Foucault current caused by the internal movements of electrons in the metal. The Joule Effect transforms this kinetic energy into thermical.
Source: physical science
Credits: Nerd