The inner core of the Earth creates the magnetic force.
The magnetic field in the Earth originates in the Core.
outer core
Convection in the outer core is thought to produce Earth's magnetic field.
The core- The Earth's magnetic field is created by the rotation of its molten core.