Attunement comes mostly from gear. Look for the realm icon marked (Attunement Bonus) on a tooltip. Bonuses from several items add up.
- Magebooks go in your off hand: the Book of Storms (Tyros) and the Book of Nature (Enalia). Scribes sell them.
- Staffs, robes, rings and amulets can carry attunement too.
- Desert Crypts always end with an attuned item in their final chest.
- Some potions, and reading certain lore books, can also raise it.