Osmosis depends on the separation of a solution from its pure solvent by means of a membrane permeable to solvent but not to solute. The semipermeable membrane can take several forms, cellophane for example is impermeable to high molecular mass compounds, such as polymers, but allows water to pass though. Palladium foil is permeable to hydrogen gas but not nitrogen or oxygen so osmosis can be performed in the gas phase.
The experimental arrangement is for the pure solvent to be separated from the solution by the semipermeable membrane. The natural tendency is for the solvent to flow from the pure solvent chamber into the solution. The tendency is counteracted by applying pressure only to the solution side. The excess pressure is called the osmotic pressure.
Now if the solute as well as solvent could diffuse through the semi-permeable membrane there would soon be a solution of different concentrations on either side of the membrane. Osmosis would now work both ways across the membrane and result in equilibrium when the same solution concentration is on both sides.