What does it mean when foamy stuff comes out of your mouth?

It could mean drug overdose or dehydrated.