Answer: Induced magnetism
Step-by-step explanation:
Induced magnetism could be defined as a temporary influence a magnet has on an object due to contact they have made, where the particles of the magnet robbed off on that of the other material, making it contact things magnet contacts for a short period of time.
Due to the nail has had a contact with the magnet, it undergoes an induced magnetism, and get attracted to metals, due to the particles of magnetism that has been robbed off on it. This happens only for a short period of time.