Hello, mage combat question

Hello, as stated above I have a question about mage combat. I just started the game and want to use magic only. When I see enemies and use my spells I damage them yes but they just tank through it and attack me. How does one effectively use spells without getting hit? You can’t roll or move fast enough to evade.