Oregano (Origanum) is a relatively easy herb to grow in your home garden. When plants are grown in healthy conditions, you will seldom encounter problems. Sometimes, no matter how well you tend your oregano, you may walk out into the garden and find signs of pests. Small deposits of white on the plant can be indicative of several types of pest, but add "foam" to the equation and you can quickly deduce the likelihood of spittlebugs having taken up residence.
Rule Out Other Pests
Before taking action, try to identify what you are seeing through closer inspection. Pests to rule out include aphids, which can be white or green and appear in clumps that look like balls. If you look closely, especially with a magnifying glass, you'll easily be able to make out individual insects. No foam should be present. White fly look like tiny white flies but are hard to see individually. They usually don't accumulate into groups or balls. Scale can look like hardened ladybugs or small bumps of cotton. True foam is very likely spittlebugs.
If it looks as though someone has spit on your plant, move the foam and within it, you'll find a tiny bug. This is the nest of the nymph form of the spittlebug. It hides here for protection. Although unsightly and a bit odd to discover, they usually are harmless to the plants -- in small numbers. They often form in notches on branches of many different types of plant. Also know as "froghoppers," spittlebugs are part of the Cercopoidea insect family and are distant cousins to cicadas and leafhoppers.
Hose the plant off with a moderate to strong stream. If you need to, turn the force of the water up slightly to completely wash the foamy nests from your oregano. Another solution is to pinch the foam and remove the small insect by hand. Some people crush these between their fingers and then wash their hands. If your plant is more than slightly covered, you can apply an insecticidal soap made for vegetable plants.
Other Herbs Affected
Spittlebugs seem to have a preference for rosemary. If you also are growing rosemary (Rosmarinus), check it to be sure the foam is not present on plants. If your rosemary has them, and the rosemary is located near the oregano, the spittlebug may have migrated. The same is true of sage, another herb favored by the insect. These are generalities, so it's best to investigate all of your plants and hose them off.