Some mushrooms deal HP damage to players when eaten. A few mushrooms such as the death cap will kill players if eaten. To be safe, always check the tooltip for unfamiliar mushroom types.