A bug is an indicator that can be moved to mark out something. The heading bug is an indicator on a compass rose to tell where to go to. It is often connected with the autopilot and, if enabled, the aircraft will fly the course of the heading bug. The heading bug looks a bit like a squashed ladybug.
See also: Avionics and instruments