You can magnetise the needle by rubbing the permanent magnet over it. The needle is made of steel, and each atom of iron in the steel acts like a tiny magnet. Because north poles attract south poles in magnets, these tiny atomic magnets tend to swing around and form packets called domains - each one a slightly larger but still tiny magnet, all within the steel sewing needle.
The domains don't necessarily line up beyond this range. It takes energy to get them to line up and when dropped or heated (such as when the steel was manufactured) the jostling they feel tends to leave them pointing in lots of different directions. The magnetic effect is cancelled out in this arrangement, and so the whole needle is not a magnet.
By bringing another magnet close to the needle the tiny domains twist and turn to line up with the larger magnet's field. If you hold the north pole of magnet up to the needle, the south poles of the domains will swing towards it. When you remove the magnet the domains stay where they are, just as before they can't move.
Once you have magnetised your needle and placed it in a cork, you have effectively made a modern compass. The entire Earth is also a magnet, an enormous one which also has a north and a south pole. The north pole of the cork compass points to the Earth's north pole. (Very annoyingly the Earth's north pole is actually a magnetic south pole, as unlike poles attract.)
Don't stab yourself when inserting the needle you may want to have some modelling clay under the cork to push the needle into.
Source: NESTA
Date: 12 January 2008
Subject: Physics
Suitability: Over 11s Over 14s Over 16s Professionals Teachers