Answer
Spillover costs are called negative externalities as it presents a external cost during the consumption or production of the good. Similarly, spillover benefits are called positive externalities as they have external third party benefits while the good is being produced or consumed. Third parties are not consumers or producers of the good.
With reference to the diagram above, a tax that is exactly of the marginal external cost (the vertical difference between the marginal social cost and marginal private cost curves) in the case of negative externalities would be able to directly shift supply rightward to meet the private cost curve, hence shifting production to the socially optimum price and quantity. With positive externalities, the converse is true, where a subsidy which is exactly of the marginal external benefit would be able to rectify the third party benefits and shift the demand curve rightward to meet the marginal social cost curve, hence correcting the market failure and causing the welfare loss of the shaded area to be eliminated.
Subsidies to producers would shift the supply curve, which would be able to correct positive externalities in production, where the good is undersupplied. Subsidies to consumers would shift the demand curve, which would be able to correct positive externalities in consumption, where the good is oversupplied.
Work Step by Step
If a subsidy to producers were to be used on a situation where positive externalities in consumption, the allocative efficiency might still be achieved if the quantity of the socially optimum price is reached. However, prices would be pushed upward, and consumers and producers would both lose out in this situation. The converse is true if subsidies to consumers is used in a situation where there is negative externalities in production.