If a solution has a difference in osmolarity (concentration of solutes), the solute molecules should diffuse from the hyperosmotic (high solute concentration) area to the hypoosmotic (low solute concentration) area.
But if the membrane is selectively permeable and does not allow solute molecules to pass, water will diffuse in the opposite direction in a process called osmosis.