I had heard that Mars once had a planetary magnetic field, but that it is now gone? What happened to it?
Our own magnetic field is generated by convection currents in Earth's liquid outer core.
A useful summary from Physics.org:
Differences in temperature, pressure and composition within the outer core cause convection currents in the molten metal as cool, dense matter sinks whilst warm, less dense matter rises.
This flow of liquid iron generates electric currents, which in turn produce magnetic fields.
The spiralling caused by the Coriolis force means that separate magnetic fields created are roughly aligned in the same direction.
Mars used to have a liquid iron core, but it was never as extensive as Earth's and has long since solidified.
Once our own core cools enough to solidify, we too will lose our magnetic field.