The state should be borrowing for stimulus and building infrastructure during economic downturns. It is cheaper to build during these times because of depressed labor markets and lower prices for equipment/goods.
The debt should then be paid back during expansion periods with excess revenue brought in through raised taxes (again, raised during expansion)
Yeah, that's classic Keynesian mythology, but it's not how things work in the real world.
Actually that's a rather poor bastardization of Keynes. I'm sure he'd prefer that all the money go directly into the hands of poors who would spend it immediately. The silly argument about infrastructure is just to sell it politically - it has no economic value.
Remember, the ultimate Keynesian policy is bales of cash dropped from helicopters into the ghetto. Anything less redistributive is a bit, well, of a bastardization.