Which statement about Earth’s core helps explain Earth’s magnetic field?

A: Earth’s core is composed of magnets.
B: Earth’s core is composed of iron and nickel.
C: The outer core is solid.
D: The inner core is liquid and moving.