A Painstik is a type of weapon used by the Klingons. The weapon is mainly used for ceremonial purposes for a number of important Klingon ceremonies.
Painsticks played an important role in the Rite of Ascension ceremony, in which a Klingon who has reached the age of 13 begins the process to become a warrior. In this ceremony, the youth will walk between two rows of Klingons, who will each strike the youth with painstiks. At the 10th anniversary of a Klingon's participation in the Rite of Ascension, a similar ceremony takes place. (TNG episodes: "Firstborn", "The Icarus Factor")
After the death of a Chancellor of the High Council of the Klingon Empire, the Sonchi ceremony is held to verify the chancellor's death. In this ceremony, the deceased is struck by the Arbiter of Succession and the two strongest candidates to succeed the deceased Chancellor. Since the pain inflicted by such a device is such that it's guaranteed to provoke a reaction, a lack of reaction is considered to be a sign of death. If the deceased does not respond, the declaration of Sonchi, or He is Dead is then given. (TNG episode: "Reunion")