1.) The economy slows down. In other words, GDP growth turns negative and unemployment increases. Also of importance during this step of the process: interest rates drop. Why? Lack of demand. Who wants to take out a loan when the economy is in a recession? This is why the yield curve inverts just before a recession
(Actually, what really happens is traders realize that risk based assets are at minimum going to tread water and at worst are going to fall. Hence they sell equities and buy bonds. Also note that in a recession, there is lower inflation, so interest rate payments from bonds are going to have a higher rate of return.)
2.) Now, the government borrows money to invest in two things, the first of which is social welfare payments such as unemployment benefits, food assistance etc... Why? Because people lost their jobs in a recession and they need money. This also adds to the amount of money in the economy, keeping some movement of funds moving, thereby at minimum limiting downside economic movement. Also note that PCEs comprise about70% of GDP, so bolstering this number helps.
Next, the government invests in infrastructure like roads, power grids, public works projects etc... Why? Because investment pays amazingly large dividends over an extended period of time like decades. In this article, I highlight how Houston, Texas could not be the fourth largest city in the US without major infrastructure investment, but here's the short version.
There are four areas around Houston that are growing strongly: the Woodlands, Cy-Fair, Katy and Sugarland. All are located on major highway arteries (45N, Highway 290, Highway 10 and highway 59, respectfully). All are now their own little communities with the requisite tax base to go with it. All have developed over time and now feed into the downtown area in some way, thereby creating a metroplex. And none of these developments would have happened without the highways. Also note -- the development took decades. (The same thing is happening between San Antonio and Austin, along highway 35).
Now -- let's look at what we've done by borrowing money, paying unemployment and building useful public works projects, by looking at the GDP equation: C+I+X+G=GDP.
C, or consumer spending: by providing unemployment insurance we've probably kept this figure barely positive or slightly negative thereby contributing some to growth or preventing a massive contraction. Obviously, PCEs will decrease as people start to limit their purchases, but, at minimum, they have to spend on basic things like food and shelter.
I, or investment: Since private investment will be negative during this time, we've at minimum bolstered this number somewhat by building infrastructure. But, we've also added paychecks to the economy since we're hiring people to do this work. That increases C.
Exports -- aren't part of this.
G, or government spending: first, according to the CBO, government spending has comprised about 20% of US GDP for the last 30 years. Yes, this whole project will probably increase this percentage for 3-5 years (maybe longer). But, who else is going to do it? Private demand is slowing down or negative. By filling the vacuum, we're preventing a much worse economic situation from developing. We're also preventing a deflationary spiral from taking hold.
Now, the standard response to this plan is this: you're borrowing money we don't have to increase the size of government. Yes, we are borrowing money. But --
We're doing it when interest rates area cheap: remember what I mentioned above about the inverted yield curve before a recession? That allows this to be done at cheap rates. That means when we calculate the return on investment (ROI), we're doing it from a pretty low base. Also note that the payoff period for this type of investment is decades, as demonstrated by the Houston, Texas example. So, we borrow today at cheap rates, build the infrastructure from which future growth will occur, and then let it payoff over decades. Done property, there is no way this does not prove beneficial in the long run.
Now, here's the payoff. In the short run, we're increasing the debt/GDP ratio. However, once we get growth back to the 3%+/year rate, the denominator of the equation (GDP) starts to grow faster than the rate of growth of the debt (the numerator). In short, over the medium term, the debt/GDP ratio stabilizes and then decreases.
That's the short version.
How do I know this works?
During the Depression, we see the first use this theory? Let's look at GDP growth:
By 1937, we see that GDP has returned to pre-recession levels.
In the 1950s, the government starts to build the inter-state highway system. Let's look at total real GDP in the 1960s, then the payoff started:
Since goods can now more efficiently move through the US, the economy can grow faster.
From the comments (some great points about construction projects during recessions):
Also, when you pay for infrastructure development during a recession, the costs are significantly lower.
There's more bid competition, contractors will take any job just to keep busy, their workers will work for less, and the cost of raw materials (e.g. steel, copper, concrete) is a lot lower - both due to lowered demand and the recession's destruction of the speculative premium.
So it actually makes strong fiscal sense for governments to concentrate infrastructure development in recessionary troughs.