Earth's magnetic field is a magnetic field that extends from the Earth's interior out into space, where it interacts with the solar wind, a stream of charged particles emitted by the Sun. This magnetic field is primarily generated by the motion of molten iron and other metals in Earth's outer core through a process known as the geodynamo.