Magnetic compasses and gyro compasses are both essential for marine navigation, but they operate on different principles. While a magnetic compass relies on the Earth’s magnetic field, a gyro compass uses the rotation of the Earth. Gyro compasses are more stable and accurate over long distances, while magnetic compasses are simpler and cost-effective.