Molten iron core; micro particles of magnetite circulating in the ocean currents (gives new meaning to the term) would perhaps generate charges in the earth; but how would that produce magnetic poles?
The induced currents in the earth causes the molten core iron to align magnetically, giving a spherical application of the Left Hand Rule? Somehow, that doesn’t sound quite right, but a starting point.
Google dynamo field and Alpha effect.