I think, with the recent commotion over how, in "Baby Cakes", Mr. and Mrs. Cake had a pegasus baby and a unicorn baby, that I should post this link about how genetics in Equestria work. For those who want the TL:DR version, I'll sum it up for you:
-The genes of two ponies do not mix, which is why only Celestia and Luna have both wings and horns and nopony else does.
-A quote from the explanation: "It's not entirely impossible for a foal to be of a completely different race from their parents. If their grandparents are of different races they can inherit those from them, even if they were a long way down the family tree." That explains how Pumpkin Cake and Pound Cake are able to be what they are.
-The magical flow within all ponies can randomly alter DNA, which can cause bad gene mutations. Because of magic, same sex reproduction is possible in Equestria. However, this is only possible with the help of a fellow unicorn and, in the case of stallion-stallion relationships, a surrogate mother.
-In every relationship, there is always at least a small chance of the baby being an earth pony, since it is the basic DNA strand.
And there you have it. By the way, this explanation is not canon, but I feel that it is the best one out there. Special thanks to Ask Fluttershy and Pinkie Pie for the info!