A subsidy generally affects a market by reducing the price paid by buyers and increasing the quantity sold. Subsidies are usually pareto inefficient because they cost more than they deliver in benefits.
To see why, start with a market without a subsidy. The market would reach an equilibrium where the demand curve intersects the pre-tax supply curve, which is given by the sellers' willingness to accept (W2A). The price would be Po and the quantity would be Qo (o for original). Graphically, the equilibrium would look as follows:
Now suppose the government begins subsidizing sellers by paying them Z dollars per unit sold. Suppliers now receive a total of Pn+Z for each unit: the amount paid by the buyer plus the amount of subsidy provided by the government. They sell until:
Pn + Z = W2A
Pn = W2A - Z
Thus, the supply curve changes as shown in the diagram below:
The effect of the subsidy is that sellers can now charge Z less then their W2A because the government is going to make up the difference. The price falls to Pn and the quantity rises to Qn. Sellers get to keep Pn+Z.
The sellers gain area A in new producer surplus. The buyers, who now pay a lower price, gain area B in consumer surplus. However, the total cost of the subsidy to the government is Z*Qn, which is equal to areas A+B+C. The subsidy thus costs C dollars more than the benefits it delivers. It is pareto inefficient, and area C is deadweight loss.