If two solutions of different concentrations are separated by a semi-permeable membrane (that is, a membrane that allows some substances but not others to pass through), the water from the weaker solution will start moving into the stronger solution. This is the process of osmosis.
The flow will continue till the solutions on both sides have the same concentration. When grapes are put in the thick sugar syrup, the skin of the grapes act as a semi-permeable membrane and water from the grapes moves into the sugar syrup. The grapes shrivel up as a result.
Picture Credit : Google