Magic effects are divided up into eight elements: the "Classical" elements of Fire, Water, Air, and Earth, plus the "Esoteric" elements of Primal, Occult, Radiant, and Necrotic.
Just as your Arcane Tradition is the “how” of using magic, your Elemental Affinity is the “what” of magic, determining which kinds of spells you can cast most easily and which elemental Feats and Rituals you can learn. Your Affinity for an element represents your understanding of it at a deep and intuitive level, allowing you to more easily grasp its power and the nuance of how to wield it.
When you choose your Arcane Tradition and gain your Mage ability, it gives you +1 free rank of the Elemental Affinity feat, granting you an Affinity for one of the eight elements of your choice. You can gain new Affinities by taking more ranks of the Elemental Affinity feat.
Casting a spell or technique of an element that you do not have an Affinity for is difficult. You suffer the following effects when casting such a spell:
You cannot cast Rituals of an element that you do not have an Affinity for. If you learned a Ritual via an Ancestry Feat but don’t meet that Feat’s usual prerequisites (including any Affinity requirements), you can still cast that Ritual as a form of natural magical gift from your ancestry.