The answer to this question lies in the law of supply and demand. The steering force in determining supply and demand is price.
Therefore, if you have a shortage, price will go up. This will drive demand down.
If you have a surplus, price will go down. This will entice more people to buy your product thus reducing your surplus.