Saw Nothingeverlost just answer an ask about this and since I was discussing this topic earlier today I thought I’d throw in my own theory about how Regina got her magic.
My current thinking is that Regina was at some point Rumple’s apprentice. The comment that sparked this discussion for me earlier was someone saying that Regina probably turned to magic (and Rumple) out of desperation to escape her current life, especially in light of her previous disgust with her mother’s magic. But if there’s one thing Daniel’s death would have solidified in Regina’s mind, it’s this: no matter what you do or how hard you fight, you’re powerless without magic. The only way you can get what you want in life is by using magic to force others to obey your will.
The moment when Regina declares that she should have let Snow die in their first encounter is, I think, the moment when she begins immuring the innocent girl she used to be, and with her all the dreams she had. That done, there’d be nothing stopping Regina from resorting to the very methods she used to reject in order to fulfill her desires.
Related to this, it’s also possible that Regina is still somewhat reluctant about learning magic even after Daniel’s death. But her mother, ever ambitious, wants Regina to learn it in secret so that Regina can manipulate Leopold or even overthrow him and become sole regent of the kingdom. Cora would, of course, be enjoying a high-ranking position of her own.