* Unmagnetized Needle: An unmagnetized needle has its magnetic domains randomly oriented. This means the tiny magnetic fields of each domain point in different directions, canceling each other out. There's no overall magnetic field, so it doesn't attract or repel other objects.
* Contact with a Magnet: When you bring a magnet close to the needle, the magnetic field of the magnet exerts a force on the domains within the needle. This force aligns the domains within the needle, causing them to point in the same direction. This creates a temporary magnetic field in the needle.
* Attraction: Now, because the needle has a magnetic field (even if it's temporary), it will be attracted to the magnet. The opposite poles of the magnet and needle will attract each other.
Key Point: The magnetic field of the needle is only temporary. Once you remove the magnet, the domains within the needle will randomly reorient, and the needle will lose its magnetism.