There are two main types, such as dry and wet coughs. Dry cough is usually caused by a cold (viral infection) or allergies, whereas wet cough is due to bacterial infection which causes phlegm/mucus.
Coughing in baby (< 4 months old) shouldn't be taken lightly and hence decoding baby's cough is important. Refer to this website by parents.com for detail.
Common cold/flu (viral): Cough sounds like "hacking" (not the literal meaning, but rather the "hacking" sound) sound. For discerning different types of coughing sound and the term used such as "whooping" (sound ending in the each coughing), dry/"hacking", productive(with phlegm)/wet, and "wheezing" coughs can be referred to in webmd.com site. Cold (viral origin) normally requires the immune system to beat, and there are several ways to alleviate the symptoms such as more fluid, rest, regulating fever (by damp cloth), humidifier (to alleviate blocked or irritated nose/airway), honey (make sure baby has no allergy to pollen; Asian has less problem), Luo Han Guo (or monk fruit, or scientifically Siraitia grosvenorii) which has been known to have no reported toxicity, among others.
Croup (viral origin is common): common in countries with winter season. The cough sounds like barking. Refer to kidshealth.org site.
For other illness such as pneumonia (productive/wet cough), bronchitis/asthma (cough with "wheezing"), whooping cough (pertussis), you can refer to parents.com site.