'Cuckoo spit' produced by a Common Froghopper (Philaenus spumarius) nymph. The nymph feeds on plant sap, and excretes excess sap mixed with a secretion from the abdominal glands through the anus. The nymph blows air into this fluid as it excreted, creating the bubbles.
The 'cuckoo spit' keeps the froghopper nymph moist and stops it from drying out, as well as giving some degree of temperature control. It also acts as a defense, hiding the nymph, and having a taste unpleasant to predators.