What does solubility depend on?
I am not sure whether you wonder gas solubility in liquids or solid solubility in liquids.
In any case temperature is one parameter that affects solubility. If water is hot, it can dissolve sodium chloride in higher amounts.
Another factor is pressure. Pressure increases solubility of gases in water for example.
If there are other solids/gases, it is hard to dissolve another solid/gas. In other words, purity of solvent (water in many cases) is another parameter affecting solubility.