The feature that allows this to happen is a semipermeable membrane (selectively permeable membrane). This allows the cell to decide what gets in, it allows things like hydrocarbons and oxygen and water to pass, but prevents large sugars from getting in. The process of water passing through the holes in osmosis which is the diffusion of water across this semipermeable membrane.