Market failure is when the price mechanism leads to an inefficient allocation of resources and a loss of economic welfare. One example of market failure is Public Goods. These are non-excludable and will therefore be under-provided in the free market.
Government intervention can reduce market failure through regulation, taxation, or in the case of public goods, supplying the good which is under-provided in the free market. For example, street-lighting is non-excludable - it is impossible to stop non-customers from consuming it - and therefore no private company would provide it in the market. This market failure is corrected by the Government’s provision of street lighting, paid for by taxation.