Strange, white, waxy, cottony or foamy splotches can sometimes be found on cacti, especially Opuntia species, here in Tucson. These splotches are the secretions of female Cochineal scale insects (Dactylopius coccus). These wingless, purplish insects use their waxy secretions as a protective cover while they suck juices from the cactus.
Dried and powdered Cochineal scale insects are the source for red Cochineal dye. The Aztecs used it for painting and to dye their woven cloth a brilliant red. When Mexico was colonized by the Spaniards, they exported Cochineal dye to Europe, where this unusually brilliant red dye became quite valuable and much sought after.
Even though synthetic red dyes have since been developed and are now widely used, Cochineal red dye is still commercially produced today and is known as carmine or carminic acid, and it can be found in some foods, drinks, cosmetics, artist's supplies, and biological stains.
If Cochineal scale insects infest your cultivated cactus, the best way to remove them is to spray the cactus with a strong jet of water followed by a spray of soap, and then repeat every few days as needed until they no longer return.