@jwjohnwong1,
I don't know why my previous (long) answer was deleted.
You can see externalities as a market failure because if there are externalities, the price of a good or service will not include the social costs or benefits associated with the production of them. Without intervention, there will be too much or too less of such goods.
Examples:
Positive externalities: honey
Negative externalities: cigarettes
Regards