The direction the boat's bow is pointing, as shown by the compass.
Heading is the direction the bow points, in degrees, as read from the compass. It's the course you steer, but because of leeway and current, not necessarily the course you make good. That one is the course over ground.
Compass, magnetic, true
A heading can be given in three ways, and it's worth saying which:
| Heading | Reference | Corrected by |
|---|---|---|
| Compass | the boat's compass | deviation |
| Magnetic | magnetic north | variation |
| True | geographic north | — |
Paper charts and GPS work with true north; the steering compass shows compass heading.
From heading to course over ground
Heading + leeway = course through the water. Add the current and you get the course over ground. In dead reckoning you work this chain forwards; to find the heading to steer, you work it backwards.
Electronic compasses send the heading to the network, in NMEA 0183 as HDG or HDT, in NMEA 2000 as PGN 127250. Instruments need it to work out the true wind direction.