In the case of SALT and quite possibly most other cases, the water molecule (H2O) literally pulls apart the sugar molecule (NaCl).
POLARITY! Some molecules have a greater POLARITY than others and H2O is a prime example, the Oxygen atom is HOLDING the bulk of the ELECTRONS within the molecule so we'd say that the Oxygen is the NEGATIVE end (because Electrons are NEGATIVELY charged), therefore the Hydrogen ends are POSITIVELY charged because there are LESS Electrons present.
An NaCl molecule is the same, the negative end is the Chlorine and the positive end is the Sodium.
Due to the fact that there's typically more water (water could dissolve into salt if there was more salt than water), we'll look at it from the this perspective.
The positive Sodium is ATTRACTED to the negative Oxygen and the negative Chlorine is attracted to the positive Hydrogen.
That's fundamentally it, the polar forces of the water molecule, due to strength and volume, rip apart the salt molecules.
Thanks
Adam X