Here's a problem to solve: A compass can be made by magnetizing a needle and setting it on a floating cork. The cork will turn so that the needle is pointed north. Which statement explains why the needle points north?

Among the 4 following options, which is the correct answer?

- A: The needle is measuring the air temperature.
 
- B: The needle is showing the direction of the wind.
 
- C: The needle is lining up with Earth's magnetic poles.
 
- D: The needle is pointing to the magnetic core of Earth.
 