The newest game pack for The Sims 4 allows you to become a Spellcaster, but in order to do so, you need to go to the new area called Magic Realm. After you become a Spellcaster you can travel to the realm at your will, but you will need to find a portal the first time you do it.
The portal is hidden in the new town called Glimmerbrook. Simply head to the Watch lot and look behind the building. The portal is located just on the side of the waterfall on this lot, and you can interact with this just like any other object.
Once you interact with the portal, you get teleported to the Magic Realm. Once you are there, interact with the Spellcaster and do their tasks to become a Spellcaster yourself. When you do this, you will be awarded with the Glimmerstone, an item that you can use any time and anywhere to teleport to the Magic realm. And now you can simply click on this item to teleport to the Realm of Magic.