The genius of these two laws, is that since one slopes down, and the other slopes up, they will cross at one point. This point is market equilibrium. By using prices as an allocation device, and assuming that the law of demand and supply hold, we will always attain equilibrium where the amount sold, equals the amount bought, at a given equilibrium price.
The idea of the law of supply stems from the use of marginal costs. Marginal cost, is the cost a firm faces on the next unit produced (eg. one more quantity, or on the margin). Imagine you are a manager at a burger restaurant. It costs you $10 per hour for someone to make hamburgers, all of the other costs are assumed away for now (such as buildings, machines, meat, etc.). If you want to make hamburgers for 1 hour, it will cost you $10, but if you want to make MORE hamburgers, you will have to pay more to keep your employee around. But now your employee may want more money to stay around (think of overtime). So instead of paying $10 per hour, you now may have to pay $12. This is a very simple example of marginal cost theory, and the motivation behind the upward sloping supply curve justifying the law of supply!
After viewing this post, you may be interested in how to construct a supply curve.