Pick an object to test.
Earth acts like a giant bar magnet. A compass needle is a tiny magnet that lines up with Earth’s field and points north. (Earth’s magnetic “north” near Canada is actually a south-type pole, which is why it attracts the needle’s north end!)