Many things may cause a dog to have difficulty in breathing, perhaps obstruction of the air passage to the lungs by a foreign body or the dog's own tongue if he is unconscious; strangulation by his collar; electrocution; drowning; heart attack; chest injuries or poisons.
Like with human CPR, you must follow the A B C rule - that is Airway, Breathing and Circulation
Rather than type out the instructions here, we have attached the following link which will give you a PDF document to print out. This contains all the necessary information for dog CPR, along with some diagrams.
We would suggest that you print this out and keep a copy in your dog first aid kit and/or on your fridge or pinboard or anywhere that it can be easily accessed in an emergency situation.