CPR:
Cardiopulmonary resuscitation, or CPR for dogs, is a combination of chest compression and artificial respiration. It is normally used when you cannot feel or hear the dog’s heartbeat. Once the dog stops breathing, the heart will go into cardiac arrest and cease beating.
https://www.petmd.com/dog/emergency/common-emergencies/e_dg_cardiopulmonary_resuscitation

CRITICAL: Before performing CPR for dogs, please keep in mind that CPR is hazardous and can cause physical complications or fatal damage if performed on a healthy dog. Dog CPR should only be performed when necessary.

Why know CPR for a dog:
Seeing your dog in a life-threatening situation can be a frightening and stressful experience, especially if the dog is unresponsive. Equipping yourself with the knowledge to effectively recognize and take action treating your dog’s condition can keep you calm and greatly increase your dog’s chance of survival. Two life-saving procedures you need to know are artificial respiration and CPR for dogs.

Evaluate Your Dog’s Condition:
Before doing anything you must evaluate your dog’s condition so you know what to do.

Is Your Dog Breathing:
Hold the back of your hand or your cheek up to their nose and feel for air. Also, watch for the rise and fall of their chest. If they are not breathing, check their airway for any blockage. Pull the tongue forward as far as possible and remove any objects or liquids in the throat or mouth.

Does your dog have a Pulse:
The femoral artery, located on the inner thigh, is the easiest place to find your dog’s pulse. Run your hand along the inside of the hind leg until you are almost to the point the leg joins with the body. There you should feel a slight dip where the femoral artery is closest to the skin. Use your fingers (not your thumb) to press down gently and feel for a pulse. If you cannot feel the pulse at the femoral artery, try just above the metacarpal pad (the large, center pad) of your dog’s front paw, or directly on top of the heart. Your dog’s heart is located on the left side of their chest. To find it, lay your dog on their right side and bend the front left leg so the elbow touches the chest. The point on the chest where the elbow touches is the location of the heart. If your dog has a pulse, but is not breathing, you can just perform artificial respiration (Skip down to Does your dog have a pulse below). If your dog does not have a pulse, you will need to do CPR, or Cardiopulmonary Resuscitation, which is a combination of artificial respiration and chest compressions.

CPR for Puppies and Dogs Less Than 30 Pounds (14 kg):
1. Lay the dog on a flat surface with his/her right side against the surface.
2. Cup your palms and hold the dog with one palm on either side above the heart region. (You can also place your thumb on one side of the dog’s chest and keep the fingers on the other side.)
3. Compress the chest one third to one half the width of the chest for a count of one, and then let go for a count of one. Carry on at a rate of 100-120 compressions in a minute.
4. Close the muzzle with your hand before beginning artificial respiration. Give two breaths into the nose for every 10 to 15 compressions. It is best to have another person give the two breaths so compressions can continue during the breathing. A new person doing compressions should take over every two minutes or so to reduce the effect of fatigue.
5. Continue with the CPR and artificial respiration for dogs until the dog begins breathing on its own and the pulse becomes steady.
6. If the dog does not show any signs of improvement after 10 minutes of CPR, you can stop, as it has not proven successful.

CPR for Medium/Large Dogs Over 30 Pounds (14 kg):
1. Lay the dog on a flat surface with his/her right side against the surface. (You will need to stand towards the dog’s back.)
2. Place one of your palms on the dog’s rib cage, near the heart region, and put your other palm on top of it.
3. Without bending your elbows, press the rib cage in a downward motion.
4. Compress the chest one third to one half the width of the chest for a count of one, and then let go for a count of one. The rate should be 100-120 compressions per minute.
5. Close the muzzle with your hand before beginning artificial respiration. Give two breaths into the nose for every 10 to 15 compressions. It is best to have another person give the two breaths so compressions can continue during the breathing. A new person doing compressions should take over every two minutes or so to reduce the effect of fatigue.
6. Continue performing CPR and rescue breaths until the dog begins to breathe and has a steady pulse.
7. If the dog does not show any signs of improvement after 10 minutes of CPR, you can stop, as it has not proven successful.

Heimlich Maneuver:
Video of it explained and being done
https://www.petmd.com/dog/emergency/common-emergencies/e_dg_choking