Externalities are costs or benefits that exist outside of the market mechanism and are not reflected in prices. They occur when social costs and benefits differ from private costs and benefits, leading to a misallocation of resources. External costs of production include pollution from cars increasing air pollution. External benefits of consumption can be both private, like enjoying music, and social, like providing entertainment to others. Government intervention may be needed to address positive externalities like research and development or education.