Sugar cubes (and salt, and many other materials) dissolve in water because water is a powerful solvent. Properties of water molecules cause them to break down the crystalline structure of a sugar cube.
Water molecules are polar, meaning that one part of the molecule has a slightly positive electric charge, and one part has a slightly negative electric charge. Sucrose molecules also have a part that carries a slight negative charge.
The bonds that hold a sugar cube together in a crystalline structure are fairly weak and rely on the sugar molecules being in contact with each other.
The attraction between the negatively charged part of the sugar cube and the positively charged part of the surrounding water molecules pulls the sucrose away from the crystalline structure.
The negatively charged part of the sucrose molecule pulls in water molecules from all directions. They form a shell around the sucrose, preventing it from rejoining the crystalline structure. This layer of water molecules is called the hydration shell.
When the water is removed, through evaporation for example, the sucrose molecules come into contact with each other again and reform their crystalline bonds. They are not changed chemically in any way by the process of absorption.