Liquids in narrowly confined spaces have properties that are very different from those of the bulk. In this thesis three different systems have been studied using computer simulations. The first is a molecular dynamics study of liquid water between parallel plates subjected to an external electric field. The second study is a Monte Carlo simulation of water inside a carbon nanotube. We study the electric field dependence of the equilibrium between the empty and filled states of the nanotube. We also investigate the electric field dependence of the equilibrium between the two states of the filled tube that correspond to two orientations of the total dipole moment of the water chain along the tube axis. By studying the temperature dependence of the free energy of occupancy, we evaluate the energy and entropy of the water inside the tube relative to bulk water. Finally, these Monte Carlo methods are applied to water in hydrophobic protein cavities. The filling of nonpolar cavities with water is found to be thermodynamically favorable under conditions which are critically dependent on the cavity size and the interactions with the cavity walls.