The main tools of macroeconomic policy are taxes, government spending, and monetary policy. These can all be used to combat recessions and overheating and, to some degree, stagflation.
Recessions, which are characterized by high unemployment, and overheating, which is characterized by high inflation, are opposites of one another. Therefore, policymakers have to do opposite things to combat them. When an economy is in a recession and unemployment is high, policymakers have to try to stimulate the economy. They should do this by putting more money in the hands of the people. This can be done in a number of ways. It can be done by cutting taxes so less money goes to the government and more stays with the people. It can be done by increasing government spending so that the government pays more money to people who provide goods and services. Finally, it can be done by pursuing an expansionary monetary policy (lowering interest rates or buying government securities), which puts more money into the economy. All of these policies should help to stimulate the economy and reduce unemployment.
With overheating, the problem is switched around. Now, there is too much money out in the economy and it is driving prices up. Therefore, the government needs to reduce the amount of money available. To do this, the government is supposed to raise taxes, cut spending, and pursue a contractionary monetary policy (raise interest rates and buy government securities). This should reduce aggregate demand and thereby reduce inflation.
With stagflation, policymakers are at a loss. As you can see in the link below, policymakers really do not know what to do to end this problem. Any policy that a government takes to reduce inflation will increase unemployment while any policy taken to reduce unemployment will increase inflation. Therefore, there is little agreement on how to end stagflation.