Cardiopulmonary resuscitation (CPR) is a lifesaving technique that's useful in many emergencies in which someone's breathing or heartbeat has stopped.