Baby weaning from breastfeeding

Em

Is it common for a baby to wean themselves from breastfeeding? I've heard of this happening and curious how common it is. What sort of things would cause a baby to wean themselves, and is there anything I can do to prevent this from happening?