How does Temperature Affect Solubility?

For many solids that are being dissolved in liquid the solubility increases as the temperature increases. On the other hand, gasses tend to become less soluble as the temperature increases.