The iron in the lava is aligned with the current magnetic configuration and is frozen in place when the lava cools.