It is carried out as an emergency procedure on people who have suddenly stopped breathing in cases such as heart attacks, near drowning or cardiac arrest in cases of electrocution.
As the name suggests it has two components, Cardiac and Pulmonary.
Pulmonary: giving mouth-to-mouth rescue breathing.
Cardiac: giving chest compressions.
Cardiopulmonary Resuscitation (CPR ) is an emergency procedure that can be easily carried out by anybody trained or untrained in doing the same.
Rescue breathing:

Before giving the rescue breathing, it is important to check that the airway of the person is not blocked. This is done by laying the person on his/her back, softly pushing the forehead backwards and pulling down the chin to open the mouth. Remove any denture or foreign bodies blocking the airway. Check if the person is breathing normally. If not, then begin mouth-to-mouth respiration. Pinch the person’s nose, cover his/her mouth with yours and give two rescue breaths. The first rescue breath should last for one second. Check if the chest rises after the first breath, if not give the second breath. If there is no spontaneous breathing after this too start chest compressions.
Chest compressions:

Place the heel of one hand over the middle of the individual’s chest. Put your other hand over your first hand. Your elbows should be straight with your shoulders positioned directly above your hands. Use the weight of your upper body to push straight down on the individual’s chest. Push hard and fast. Give two compressions per second. After you complete 20 compressions, tilt the head back and lift the chin up to open the airway. Give two more rescue breaths. Continue with chest compressions and rescue breaths until the individual starts breathing on their own or until a professional medical help arrives.