Keynesian revolves around a single, but very important, idea: “Prices do not go down.”
Imagine demand in an economy drops (this occurs cyclically as part of the business cycle). As a result the amount of stuff bought, and thus the economy’s size, would decrease.
Traditionally it was imagined that prices would thus drop. Because there’d be an excess of resources (particularly labour) so those resources would drop in price.
A lower price for resources of course means that things would get cheaper, thus increasing the amount of stuff bought, and thus economic output would climb back up. Disaster averted.
The problem is that prices (specifically labour) do not respond in such a way. They tend to be “sticky”. For instance, instead of taking wage cuts people tend to stop working. In fact the prices of commodities tend to go up during a recession, as people move their money into safer havens (you don’t know which company will go bust, but people will probably still want gold after the recession).
As a result Keynes realized that if left alone small demand decreases could cause massive recessions.
So, since then, governments have engaged in “stimulus spending”. This basically means that when demand suddenly drops, you spend lots of money (eg building new infrastructure, more benefits, etc) to stimulate the economy. Importantly, when demand is strong you increase taxation and cut spending, allowing you to pay down the debt incurred doing all that stimulus spending.
The problem is that it’s politically difficult to do the latter: people, especially when they’re used to spending, don’t want to see all that government money cut. And it’s politically unpopular to do so when the economy appears to be doing well.
As a result some countries end up racking up more and more debt. Which is the biggest criticism of Keynesian economics.