Okay, I am getting real confused on how water flows from a hypotonic solution to a hypertonic solution through a semipermeable membrane. It is known that hypertonic solutions have higher osmotic pressure than hypotonic ones, so shouldn't it be the opposite? Is osmosis even related to osmotic pressure or is it just because of difference in concentration?
Osmotic pressure is the additional external pressure that needs to be applied to a solution to compensate its osmotic flow to a second solution, so that there is not net flow between them.
Let's imagine a tube with a piston in each extreme, so we can control the pressure we apply to both sides, with a semipermeable membrane inside it. If the concentration of solutes on both sides is different, there will be an osmotic flow from the hypotonic side to the hypertonic side. To compensate for this osmotic flow, we will need to apply more pressure to the hypertonic side than to the hypotonic side - and in mechanical equilibrium, this additional pressure is equal to the difference in osmotic pressure between the solutions.
Alternatively, if we want to get rid of external pressures, osmotic pressure can be understood not as a pressure exerted on a solution, but by the solution with a certain osmotic pressure on neighbouring solutions with which it can exchange solvent. So, the hypertonic solution exerts more pressure on the hypotonic solution than viceversa, and the result is that solvent moves from the hypotonic solution (which receives more osmotic pressure) to the hypertonic solution (which receives less osmotic pressure) until they become isotonic, just as would happen if it exerted more hydrostatic pressure. This is mathematically equivalent to the original definition.