Cardiopulmonary resuscitation (or CPR) was the Terran term for the manual stimulation of a being's heart. The technique as used on Earth was first perfected for surgical use in the 1940s, and again for first responders in the 1960s. Layman training in its use was common, and in many cases recommended, by the 1980s, with techniques under constant refinement and revision into the 21st century.
Further advances on Earth at the turn of the 21st century revealed that machines capable of compressing the entire rib cage could circulate blood in a patient far more efficiently than normal Human-administered CPR, which only compresses the sternum. This greatly increased the likelihood of patients surviving cardiac arrest. With the use of cortical stimulators and various advanced medicine, even this is obsolete for routine medicine by the 22nd century.
Though uncommon due to technology, CPR was still used in the 23rd century if so required. Dr. Leonard McCoy attempted CPR on Chancellor Gorkon after attempts of reviving him with technology failed. Although McCoy's CPR (along with what was possibly the "precordial thump" technique) revived Gorkon, he died moments later. (Star Trek VI: The Undiscovered Country)
In the 24th century, CPR was used solely in field medicine when other stimulant technologies were unavailable. It was typically used in conjunction with cordrazine, which was included in all field first aid kits. (VOY: "Coda")