After you become a Spellcaster in The Sims 4: Realm of Magic, you are able to duel against other sims. This is just for fun, but it is a nice way to actually gain skill in Spellcraft. It's also needed for the "Spellcraft & Sorcery" Aspiration.
In order to duel another sim, head to the Magic Realm. When you are there, most other sim will be able to Magic Duel you. All you need to do in order to do this is to click on them, select the "Magic" menu, and click on "Duel". This will prompt the duel to begin, which will play out automatically.
If you want to win duels, you will need to duel against sims who have less Spellcasting skill than you, so either try of bunch of different sims in the Magic Realm, or rank up your Spellcasting skill by practicing your magic.