There are a number of factors that determine the solubility of different substances in various solvents. One of these is temperature. Most substances have different solubilities depending on temperature, and for many substances, higher temperatures tend to result in greater solubility. For instance, salt and sugar into hot beverages is one commonplace example--they dissolve well into hot water, tea, etc., but less is able to dissolve at lower temperatures.
Another factor that determines solubility are the relative polarities of solutes and solvents. If substances have a strong electromagnetic attraction for one another, they tend to stay tightly bound within one another (e.g. water molecules that dissolve many solutes well, and are very polar); however, if the polarities of solute and solvent results in only weak attractions, this can result in a weak level of solubility, with less solute being dissolved.