Magnet
In general the magnet is a special kind of metal (alloy), it attracts other metals or or magnet closer to it.
The earth is a magnet, because it attracts everything towards it.
compass:
A compass is needle, which is magnetized and mounted in measuring devices (like, pressure gauge, voltmeter, watt meter, etc.) such that it rotates freely. In the measuring devices the needle turns until one end points north and other south.
Demonstration:
Let us consider an ordinary bar magnet and a regular compass, Now move the regular compass around the bar magnet (circling) , and observe it, what happen?
Yes, you will notice the needle rotates in the regular compass. When you bring the compass near the bar magnet, the needle of the compass points to the south and when the compass away from a bar magnet, the needle moves to the north pole. So we conclude that the north end of the compass attracted to the south end of the magnet.