What is an externality?

What is an externality? How is an externality corrected in an economy?