Whilst hanging is one of the most reliable methods of suicide, as for firearms, it is not 100% effective - studies would suggest 77% - 88% effective1. Although when carried out correctly, there is high certainty of death. There are two principal methods for hanging:
Short drop/simple suspension. In this method cause of death is normally asphyxiation (lack of oxygen) caused by weight of the body on the noose, thereby constricting the trachea (air passage). However, death is also possible simply by compression of the carotid arteries or the jugular veins, thereby cutting off the blood supply to/from the brain. Cutting off the airway in this case would not be essential.
Drop hanging. This method was typically used for judicial hangings, where a trap door opens and the person drops somewhere between 5 and 9 feet. The force of the drop, coupled with the positioning of the noose, violently jerks the head back, thereby rupturing the spinal cord causing instant deep unconsciousness and rapid death.
JJ Card, "Lethality of suicidal methods and suicide risk: Two distinct concepts", Omega 5, 1974. NL Farberow and ES Shneidman, The Cry for Help, 1961.