When your child gets a cough, it's often not easy to decide whether to let nature run its course or hurry in to the pediatrician's office or even the ER. While most coughs are essentially harmless, some signal an infection that needs treatment.

"A cough is never normal," says Barbara Pena, MD, MPH, research director of the emergency department at Nicklaus Children's Hospital in Miami. She is both a pediatrician and an emergency medicine specialist. "It's a protective mechanism." Coughing is the body's attempt to clear the airway of something that’s not meant to be there, she says. That could be mucus, for instance, or a foreign body like a toy or a peanut.

Here, what to know about coughs and how to decide what to do when your child gets one.

Related: 7 Ways to Ease Your Child’s Cough Without Medication

Wet vs. dry coughs

If your child has a wet cough, that means the body is producing mucus or phlegm, Pena says. "A wet cough should be seen by a doctor," Pena says.

When a dry cough develops into a wet one, it can be a symptom of pneumonia, she says. The cough may produce greenish or yellowish discharge. If it's pneumonia, the cough is usually accompanied by a high fever, chills and shortness of breath. Seek emergency help right away if the child has trouble breathing, Pena says. If he has a fever and a wet cough but is breathing fine, seeing the pediatrician the next day is probably fine, she says.

Dry coughs from colds can be treated at home. Pena recommends drinking fluids (try warm fluids with honey), breathing in steam and using a humidifier. If a dry cough doesn't get better in five or seven days, it's time to see a doctor, she says.

If a dry cough doesn't get better and goes on for weeks, it may be a symptom of asthma, Pena says. Suspect asthma, and have your child checked for it by his pediatrician, especially if the cough is very dry and comes on mostly at night, she says.

Telltale coughing sounds

The sound of a cough holds some clues to its origins.

Bronchiolitis: If your child has a runny or stuffy nose and a cough that sounds staccato, it could be a sign of bronchiolitis, an infection of the small air passages of the lungs, called bronchioles. This condition is usually caused by a virus, often RSV (respiratory syncytial virus). Kids are more likely to have this than bronchitis (inflammation of the mucous membranes in the bronchial passages), Pena says. Other symptoms include a whistling (wheezing) sound when exhaling, according to the Mayo Clinic.

If breathing becomes very rapid or labored, or if the child appears to be worsening, go to the ER. In less severe cases, supportive care such as a cool mist vaporizer in the bedroom may help.

Whopping cough (pertussis): This highly contagious respiratory tract infection affects young children who haven't yet had their pertussis vaccination. "It's like an intense, hacking cough," Pena says. "It usually starts with a stuffy, runny nose, watery eyes and a mild cough with a low grade fever." About a week later, the cough progresses to characteristic ''whooping'' sound, she says. Early treatment, usually with an antibiotic, is important.

Related: Adults Need the Whooping Cough Vaccine, Too

Croup: Croup, an infection of the upper airway, sounds ''barky," Pena says. Some say it sounds seal-like. Airway collapse is a potential danger, so Pena advises paying close attention to the child's breathing. If the breathing sounds very labored, that is a sign of a severe case, she says, and it's time to head to the ER.

For less severe croup cases, you can try taking your child outside for a blast of cold air or sitting with her in the bathroom with steam from the shower for a few minutes to open up the airway. Often, Pena says, parents will head to the ER with a croupy child and find the child is much better when they arrive, thanks to the cool night air.

A word about cough medicines

If your poor child’s cough is keeping her up, you may be temped to give her cough medicine, but hold off. Cough medicines should not be used in kids under age 6, according to the American Academy of Pediatrics, as they have not been shown to help and may harm. For children over 6, it's best to get guidance from the pediatrician before administering cough medicine.

Related: The Best Ways to Disinfect Your Kids’ Toys

Like this article? Share it with friends by clicking the Facebook or Twitter button below. And don't forget to visit our Facebook page!

Kathleen Doheny is a Los Angeles journalist specializing in health, behavior and fitness topics.