Consumer and producer surplus are shown by the basic demand and supply curve diagram. Drawing a dotted line from the equilibrium point to each of the axis allows us to show them. The consumer surplus is the area above the market price and below the demand curve, this represents the consumers gain as it is the difference between what they are willing to pay and the price they actually pay (the market price). The producer surplus is the area between the market price and the supply curve. This is the amount the producers gain as it's the difference between what they're willing to produce and the price they receive for a unit of the good. Although the typical drawing shows them to be quite equal we can see that they can vary a lot, as the steepness of the curves changes.