Typically, the main thing that can be done to resolve market failure is to have the government step in. If the market cannot bring about good results, the government is typically the only entity that can remedy the situation. Let us look at a few ways in which this is so.
One market failure is the failure to provide public goods. The market has little incentive to provide things like policing, which cannot be denied to people who fail to pay for them. What then happens is that the government steps in. It requires everyone to pay for the service (through taxation) and it provides it to everyone.
Another market failure is negative externalities. Left to themselves, markets would typically not prevent things like pollution. When a firm pollutes the atmosphere, it does not (absent government intervention) have to pay for the damages that pollution causes. Thus, the firm makes money by polluting and passes the costs on to others. In this situation, the government steps in and remedies the situation. It might ban practices that pollute. Alternately, it might force the polluting firms to pay for clean up.
Thus, when market failures occur, the main remedy is government action.