Sugar, like all other substances, has a limit to its solubility in water. That is why we cannot dissolve more than a particular quantity of sugar in a given volume of water. Any sugar added after that will simply stay undissolved and will be collected at the bottom of the beaker. When this happens, we say the sample is "saturated" with sugar.
However, this solubility is related to the temperature of the solvent (water, in this case). When we heat water, the solubility of sugar increases and we will see that any solid sugar collected at the base of the beaker will simply dissolve and disappear in front of our eyes (the quantity of sugar thus dissolved will depend upon the temperature of the water). When the water (containing sugar) is heated, the kinetic energy of the molecules increases and it is easier to overcome the bonds between sugar molecules. Higher kinetic energy also means that water and sugar molecules will interact more often and thus, will have higher chances of dissolution.
Thus, upon heating, we will see the sugar particles (collected at the bottom of the beaker) being progressively dissolved in the water and less and less undissolved sugar will be observed.
Hope this helps.