My headcanon is that ponies reproduce much like the Asari from Mass Effect. They can reproduce with any living species, even non-sapients, although this is much more difficult, as ponies subconsciously pick out the positive attributes they see in their partner. Of course, much of the process is left up to nature, such as which pony in the coupling becomes pregnant.
If it is a m/f pony relationship, it usually is the female while rarely the male that becomes pregnant. With f/f and m/m, it is seemingly random, although body structure, health, and emotional connection to their partner may have some input. With partnerships such as dragon/pony, the pony is always the one to become pregnant, unless this is a male pony and a female dragon. The same applies to other species.
This is sort of kind of my way around magic spells and potions for pregnancies, which seem kind of overdone in my opinion, and kind of a cop-out or an easy explanation. This way they biologically already have the ability to have foals regardless of gender.
And yes, they must have sex in order to have children. The sex is only one part, however. Becoming of one body and mind is the bigger part which causes the pregnancy, which is a natural magic in every pony.
Also, if a couple do not want foals, the becoming of one mind and body will not force them to have children. Even if one pony in the relationship does want a foal, the partner can sever their contact during the becoming one. So abortions probably don’t exist, or if they do, are very unheard of with ponies. Other species probably have the procedure. (Like zebras, saddle Arabians, deer, or yaks. Changelings? Up for debate.)
And yes, I will now be doing commissions on my phone now that I have found a good app for drawing, although this might take a while. This was just a test image, and an excuse the explain how reproduction works in my universe. Unorigiverse? Yeeee