Stroke the wire with the magnet, picking up the magnet between each stroke and starting again at the beginning of the stroke (so that the magnet is only moving along the wire in one direction). Stroke the wire about 20 times.
Without touching it against anything, push the wire through the styrofoam.
Place the styrofoam on the water in the tray.
The wire will slowly turn to orient along a north-south direction, as it is attracted to the earth's magnetic field. (If you the teacher know North-South already, place it in the water in an East-West direction, so that the spinning is obvious).
The compass will stay oriented in a North South direction, as long as it doesn't come near to another compass (they will attract each other) or the side of the tray (the compass is attracted to the edges of a tray).
With this home made compass, you will not know which way is north vs south, without keeping track of which side of the permanent magnet is used to stroke the wire, but it shows the principle of making a wire magnetic.