Answer in brief:
How does temperature affects the solubility of a solute in solvent?
Solubility: It is defined as the maximum quantity of solute that can be dissolved in a specific quantity of solvent at a fixed temperature and pressure.
Case 1: Solubility decreases with temperature
If the heat released in the dissolving process is more than the heat required for breaking the molecules of the solid, the reaction is exothermic i.e evolution of heat. The addition of more heat will inhibit the process as the excess heat is already produced by the reaction. Hence the solubility decreases.
Case 2: Solubility increases with temperature
If the heat released in the dissolving process is less than the heat required for breaking the molecules of the solid, the reaction is endothermic i.e absorption of heat. The addition of heat provides more energy to break the bonds of solid facilitating the dissolving of the solution. Hence the solubility increases.