Most infections are spread through aerosol (moisture droplets) from sneezing or coughing, and also through fomites.
Veterinarians recommend that any dog that is suspected of having kennel cough be isolated from other dogs for 14 days, however they are usually only contagious for the first 7-10 days of illness.