The occasional cough does not have to mean that your dog is ill, but a cough that keeps coming back can have many causes. Infection and inflammation of the airways, problems with the windpipe, chronic bronchitis and heart disease are examples of conditions that can cause similar symptoms. How the cough sounds is rarely enough to make a diagnosis.
Note when the cough comes. Is it during exercise, at night, when your dog drinks or when it pulls on the lead? Does your dog have a fever, a runny nose, less energy or faster breathing even at rest? The vet may need to listen to the heart and lungs and sometimes add X-rays or other examinations.
Book a vet if the cough persists, gets worse or affects your dog's energy. Seek emergency care if your dog has obvious difficulty breathing, turns blue or very pale in the gums, collapses or quickly gets worse.