The first question is whether the cough is working.
An effective cough — they can speak, cry, or cough loudly — needs encouragement and nothing else. Stay with them. Do not slap the back of somebody who is coughing effectively; you can dislodge the obstruction into a worse position.
An ineffective cough — silent, unable to speak or breathe, going blue:
- Five back blows. Lean them forward, heel of your hand between the shoulder blades, sharply. Check after each one.
- Five abdominal thrusts. Stand behind, fist above the navel and below the ribs, pull sharply inwards and upwards. Check after each one.
- Alternate five and five until it clears or they become unresponsive.
If they become unresponsive: lower them to the floor, call the emergency number, and start chest compressions.
Infants under one year: no abdominal thrusts. Five back blows and five chest thrusts, head lower than the chest, supported along your arm.
Afterwards. Anybody who has received abdominal thrusts must be seen by a doctor — the thrusts themselves can cause internal injury. So must anybody with a persistent cough, difficulty swallowing, or a feeling that something is still stuck.
Source. European Resuscitation Council, Guidelines 2021, Basic Life Support and First Aid, https://cprguidelines.eu/guidelines-2021
What this is not. Reading, not certification.