Soldier Son Trilogy by Robin Hobb
In a world where sons of nobles are born for three purposes -- the first to be heir, the second son destined to be a soldier and the third for the priesthood -- war has meant many soldier sons have won land and titles of their own styling themselves “new nobles”. Nevare Burvelle is the second son of a new noble and his life is laid out for him on a straight line. He will go to the King’s Cavella academy and from there become a "cavella" just like his father before him in whose footsteps he is happy to tread.
However destiny has another path for Nevare. His father, unsure that Nevare is of officer material, turns him over to Dewara, a Plains warrior, to teach him the ways of the Kidona tribe. But the plainsman wants Nevare for only one thing – to send him to the dreamworld to fight the enemy tribe that he himself is too afraid of to face, and to destroy their magic with iron. Nevare, hovering between a world of magic beyond his understanding and life at the academy, is no match for the powerful sorcery that threatens to claim his soul and the political and social maneuvering of the competitive school. Only through Nevare may both worlds face each other and survive.