Question: what is earth's magnetic field generated by
Answer: electric currents in the conductive material of its core , created by convection currents due to heat escaping from the core