The three-volley salute is a ceremonial act performed at military funerals and sometimes also police funerals. The custom originates from the European dynastic wars, where the fighting ceased so the dead and wounded could be removed. Then, three shots were fired into the air to signal that the battle could resume.
It should not be confused with the 21-gun salute (or 19-gun or 17-gun, etc.) which is fired by a battery of artillery pieces.
In the United States it is part of the drill and ceremony of the Honor Guard. It consists of a rifle party firing blank cartridges into the air three times.
A rifle party usually has an odd number of members, from 3 to 7. The firearm used is typically a rifle, but at some police funerals, shotguns or handguns are used. The party usually stands so that the muzzles are pointed over the casket. However, if mourners are present near the grave, the party stands some distance away (often recommended at least 50 feet) so as to not deafen the attendees and minimize the disturbance. If the service is being performed indoors, the firing party stands outside the building, often near the front entrance. On the command of the NCO-in-charge, the party raises their weapons and fires three times in unison.
Modern United States military parties use M1, M14 or M16 rifles. The use of blank cartridges means these weapon's semi-automatic gas action will not function, requiring manual cycling of the next round between shots. Some parties equip the rifle with a blank-firing adapter, which eliminates this step from the drill after the first shot, though this is seen by some as less traditional. Similarly, the M1 and M14 are generally preferred over the current issue M16 because the appearance of these older rifles is more traditional and the charging handles are more easily operated in a dignified, ceremonial manner.