No not Magpie spit :-) There are a small number of insects which use "spit" to protect themselves from predators when vulnerable (eg eggs or larvae). Were you to look inside one of these you'd almost certainly find a small grub or catapillar.
When I was little we used to call it Cuckoo spit, but I have since learnt that moonacre is correct, I'd be interested if anyone knows what the stuff is called
'Cuckoo spit' as its commonly called is made by a little insect called a Froghopper. It has a flat 'tail' a bit like a paddle and beats this juice until it is encased in froth .