Usually, increasing the temperature increases the solubility of solids and liquids. Increasing the temperature always decreases the solubility of gases.
When you add a solute to a solvent, the kinetic energy of the solvent molecules overcomes the attractive forces among solute particles.
The solute particles leave the surface of the solid and move into the dissolved (aqueous) phase. In the image below the mass of grey (-) balls and green (+) balls represent a salt crystal. As the salt dissolves, the positive and negative ions are pulled apart and become surrounded by water molecules.