Spells can make you or break you. They have some of the powerful effects but they cost energy to cast and they have limited duration (8 hours maximum).
In order to cast a spell, the corresponding doctrine must be researched. A spell can be classified as a blessing (positive) or a hex (negative) even if it contains some mixed effects. Every spell has a success rate that can be improved (using effects) but the target can also have a magic resistance modified by effects. Success rate is also influenced by the spirituality coverage in the city or the target's doctrine.
A bless (hex) will receive a bonus (penalty) if the target has the same doctrine as the caster.
If you want to be protected from hexes (although you can't cast hexes yourself) you can acquire the Sanctuary feature from the Magic Adviser which makes you immune to any hex cast upon you for a period of time.
Note that casting inactive spells or blessings on other cities will cost you an additional amount of Premium Points*.
Hexes can also be cast over your own city-state (with great power comes some evilness!).
* Gold Membership removes the Premium Point cost.