Twilight's fears over becoming a princess convince her to attempt a spell to glimpse the future. Unfortunately, she ends up doing a bit more than glimpsing; the spell turned out to be permanent, meaning she never returned back to her own time, and therefore didn't exist for ten full years.
Her absence caused a fall-apart of the elements of harmony, and Twilight is horrified to see how they've changed without her. She doesn't know how to teleport back, so she instead tries desperately to figure out what happened and piece everyone's lives back together.