A negative externality occurs when an individual or firm making a decision does not have to pay the full cost of the decision. If a good has a negative externality, then the cost to society is greater than the cost consumer is paying for it. Since consumers make a decision based on where their marginal cost equals their marginal benefit, and since they don't take into account the cost of the negative externality, negative externalities result in market inefficiencies unless proper action is taken.
When a negative externality exists in an unregulated market, producers don't take responsibility for external costs that exist--these are passed on to society. Thus producers have lower marginal costs than they would otherwise have and the supply curve is effectively shifted down (to the right) of the supply curve that society faces. Because the supply curve is increased, more of the product is bought than the efficient amount--that is, too much of the product is produced and sold. Since marginal benefit is not equal to marginal cost, a deadweight welfare loss results. (Economics Fundamental finance n.d.)
This graph shows the effect of a negative externality. The red line represents society's supply curve/marginal cost curve while the black line represents the marginal cost curve that the firm or industry with the negative externality faces. The optimal production quantity is Q', but the negative externality results in production of Q*. The deadweight welfare loss is shown in gray.