A compass is a navigational tool that helps people find their direction using the earth's magnetic field. It contains a magnet that aligns itself with the earth's north pole to indicate the direction.
The blue dot and direction arrow in Google Maps represent where you are and what direction your device is pointing in. A minor update to the Android app today changes the arrow to a shining blue beam.