What? No it isn't produced by the atmostphere! It is created between the interactions of the SOLID iron core in the center of the Planet and the Molten Core that lies below the crust of the earth. The movements of the Magma and the turning of the core create the Magnetic Field of the earth.
So they say.