This is one of the highest military honors. Usually given at the funeral ceremonies of veterans, presidents or others involved in government service, it has also come to be used to honor foreign dignitaries or royalty.
The name is actually a bit of a misnomer as the size of the honor guard (and therefore the number of guns) ranges from a single rifleman to an entire platoon, squad, troop or regiment. The important part of the process is the number of shots fired, and their precise sequence, therefore many different honors have come to fall under this term.
During the 21 gun salute there are four volleys fired in succession. The first consists of a single shot. A brief pause is followed by seven shots in rapid order, followed by another seven. The final volley consists of six shots. This of course spells out, in fine report, 1776.