The virial theorem is frequently used to estimate the mass of molecular clouds from observations of the line width and the size, and it is used in theoretical analyses to analyze the stability of the clouds. Here we derive an Eulerian, rather than Lagrangian, form of the virial theorem for a turbulent, magnetized cloud embedded in a steady, turbulent, low-density intercloud medium. The role of turbulent pressure in cloud confinement is clarified, and it is shown that, in the absence of a magnetic field, a cloud can be at a somewhat lower pressure than the intercloud medium. Simple forms for the magnetic term in the virial equation are obtained. Radiation pressure is briefly considered; its effects are relatively small under average conditions in the interstellar medium. Time-dependent magnetic fields can be included by a proper modification of the Jeans mass. Under typical conditions, external pressure and magnetic fields are shown to have a relatively small effect on virial estimates of the mass of self-gravitating clouds.