externality
Your neighbour throws a loud party — you didn't agree to it, you can't bill them for your lost sleep, yet you bear a real cost. Or a beekeeper's bees fly next door and pollinate a farmer's orchard for free — the farmer gains, but never pays. In both cases an action spills a cost or a benefit onto someone who was not part of the deal. That spillover, landing on a bystander, is an externality.
Formally, an externality is a cost or benefit of an economic activity that falls on a third party who neither chose it nor is compensated for it. When the spillover is harmful — pollution, traffic, noise — it is a negative externality; when it is beneficial — a vaccine that protects others, a beautiful restored building — it is a positive externality. They can arise in production (a factory's smoke) or in consumption (a smoker's second-hand smoke, or a student's education that benefits society). The key trouble: because the deciding party ignores these spillover effects, the market price is 'wrong'. With negative externalities the market over-produces; with positive ones it under-produces.
Externalities are the most common cause of market failure, and the gap they create is measured against marginal social cost and benefit. They are why pollution is regulated or taxed (a Pigouvian tax), why education and vaccination are subsidized, and why the Coase theorem explores whether private bargaining could fix them. The honest point of debate is the remedy: economists agree externalities distort markets, but disagree on whether taxes, tradable permits, clear property rights, or private negotiation best put the spillover back into the price.
A coal plant sells cheap electricity but its smoke worsens asthma miles away. The buyers and the plant settle on a price that ignores those medical bills, so the market produces more coal power than is good for everyone — a negative production externality.
A cost that lands on bystanders, left out of the price.
Positive externalities are not automatically good news for the market: because producers can't charge for the spillover benefit, the market still fails — by under-supplying the thing.