Generally, emulsions occur when there is fine dirt particles entrained in the liquid, or when there are chemicals that stabilise the emulsion droplets(corrosion inhibitors are notorious for this effect) or when there is high physical shearing of the fluid. The effect of physical shearing is temporary and the emulsion may resolve given sufficent residence time.