Spectral Energy Transfer, Generation of Zonal Flows and Their Role in Confinement Transitions