The correct response is:
iron particles within the rock align with Earth's magnetic field.
Rocks can become magnetic due to the alignment of iron particles within them in response to Earth's magnetic field, particularly as they cool from molten lava.