Market failures such as externalities can cause markets to be inefficient and produce either too much or too little of a good relative to the social optimum. Negative externalities like pollution lead to an overallocation of resources, while positive externalities like education lead to underallocation. Government intervention through command-and-control policies or market-based policies like Pigouvian taxes or tradable permits can help internalize these externalities and achieve efficiency. However, collective action problems mean global issues like climate change require international agreements, though these remain non-binding with issues around equity and enforcement.