Glue ear is most commonly found in young children, sometimes as a result of a cold, or allergies; sometimes due to small ear canals. It causes the ear to become very blocked, leading to muffled hearing.
If it happens occasionally to a young child, and if their speech is developing normally, you probably don't need to do anything about it. Most children outgrow glue ear as their ear canals get bigger over the years. Sometimes doctors will recommend a minor operation to insert grommets into a child's ear; in some cases this can help greatly, although no operation is fool-proof, and it may often need to be repeated regularly.
If your child has frequent bouts of glue ear, which is clearly uncomfortable or is having difficulty hearing, you may want to consider your child's diet before going the route of grommets. Some children react badly to dairy products, for instance, which can cause excess mucus to be formed, building up in the inner ear and causing hearing difficulties. While it is not easy to avoid dairy products entirely, it is possible to use rice milk or almond milk instead of whole milk, and goat's cheese rather than cow's milk cheese. There are a wide variety of other dairy-free products available due to widespread intolerances and allergies.
If dairy products are the cause of your child's glue ear, the problem should clear up within about a week of going dairy-free. Some children can tolerate small amounts of dairy products when they do not have a cold or other infection. Older children should be encouraged to become aware of how their ears feel when they start to become blocked, and perhaps to keep a food diary to see if increased dairy products have contributed to their problems. If dairy products do not seem to be involved, you might want to consider reducing sugar or gluten (mainly found in wheat) in your child's diet. You may also want to consider increasing your child's garlic intake.
If there is any pain associated with glue ear, or if your child has serious language delay, please consult your GP or paediatrician.