How did princess celestia and princes Luna from My Little Pony friendship is magic came to power over equestria?

Well, when discord was ruling over Equestria, Celestia and Luna recovered the elements of harmony, they used them to turn him to stone, he thought nothing could defeat him so he laughed and thats why when he first appears he is in that position. They forced him into a stone prison for many years and the two sisters took over responsibility for the kingdom. if u really wanna know, just watch the first episode of season 4, it explains it.