It takes place in an alternate, parallel universe that has similarities to Earth as we currently know it.
Think about it. We know it has to be another planet or universe entirely because Celestia and Luna raise the sun and the moon. If the existence of magic in the first place wasn't enough, that clearly means that Equestria does not follow the rules of Earth as we know it.
However, we have Fluttershy's reference to French clothing to consider. That means it has to have some sort of connection to Earth, right?
Not necessarily. Keep in mind that the show has many other "ponified" references as well. Manehattan, Phillydelphia, Canterlot... all these are related to and/or inspired by Earth names. But there can't be any direct connection because, as has been mentioned, the rules of science are very intensely inapplicable.
So it must be an alternate universe. One with similarities to ours, but many differences as well. It's the only workable explanation.
Of course this would be easier if we had more information as to where Celestia and Luna came from; they could be the eternal gods of that universe, or the daughters of one eternal god, the last members of an ancient master race, who knows. Since we are given no information, it must be assumed for now that Celestia and Luna are the two gods that, as far as we know, have always existed along with Equestria and have been given the relationship of "sisters" based on their equal share in maintaining balance in Equestria.
Now that I think about it though, the one thing that could throw a kink in this plan is the existence of griffons. They seem no less intelligent than ponies, meaning it's fully possible that Equestra is a nation among other nations of various creatures. Not sure exactly where the distinction between intelligent being and creature is in this universe, I suppose, considering many animals are considered animals and creatures to the ponies, which are also animals and creatures in our world. Hmm.
EDIT: Unless they're SPACE GRIFFONS!!!