Governments can take action in fiscal policy and/or monetary policy to move their economies out of recession.
In fiscal policy, governments are supposed to lower taxes and increase spending. This puts more money in the economy and thereby increases aggregate demand. This, in theory, pulls the economy out of recession if taxes are reduced and spending is increased enough.
In monetary policy, the government is supposed to increase the money supply. It can do this through such things as reducing interest rates and buying government securities on the open market. These actions increase the supply of money and, in theory, pull the economy out of recession.