It would do the same as on Earth - it would align itself with the magnetic field of wherever it is. If it's near a planet, it would still be within the range of the magnetic field, and would point along the curvey lines which go towards the north pole. If it's in wide open space away from any planets or stars, it would just wobble around randomly and not have any particular reason to point anywhere.
Drawing a circle is what one does with a pair of compasses, not a compass. Unless it's encased in a circular box and you can draw round it with a pencil.