Ok, before you get mad at me, this is not supposed to be taken seriously. It is only a joke.
Here is sort of my interpretation on how the ponies came to be and how Equestria was made.
EDIT: I have decided to change a few things so as to not conflict with the newest episode.