What causes stagflation?
Stagflation - the combination of stagnation in GDP and inflation - is usually caused by a supply shock.
I found an image depicting the equilibrium shift resulting from a supply shock:
You can see that a shift of aggregate supply to the left leads to both a higher price level and a lower level of GDP.
This is a good description of what happened to the U.S. economy in 2007-2008, although some people also point out that aggregate demand also shifted to the left. I would argue that aggregate supply shifted first, and then confidence disappeared, shifting aggregate demand as well.