How is a magnetic compass?

Can you answer this question?