To separate sugar and water from a mixture of the two, the easiest way would be to use distillation. Distillation is a way of separating substances based on the difference in their boiling points. Using distillation it is possible to separate sugar, which has a much higher boiling point than water, from water.
The water is heated in a container which has a facility to collect the evaporated water vapor. The collected water vapor is condensed and stored separately in another container as water.
After all the water has evaporated, we find pure sugar left in the original container and pure water is collected in the one that we used for that purpose.