A Wizard of Earthsea by Ursula K. Le Guin
It was the goat that gave it away.
Some young wizards-to-be discover their destinies through an engraved invitation. But for Sparrowhawk, unscrubbed and unbiddable goat herder on the island of Gont, an overheard word in the true, magical language was enough to get him started. Not just one stubborn goat but the whole herd was brought to heel with a single word. Clearly the lad had potential.
In the world of Earthsea, magicians are about as common as doctors are today. Most villages have one, and Sparrowhawk’s aunt is on call for her community. Once it’s clear that her nephew has the sorcerous talent, she teaches him everything she knows--which isn’t much, but even so his innate abilities prove to be far, far greater than hers.
When Kardish raiders threaten to destroy their village, a stray spell he picked up from a traveling weather-worker allows Sparrowhawk to save the day. There was so much power pushed into the spell that word of his amazing feat spread across the island. Ogion the Silent, an experienced wizard, appears to train him, realizing that Sparrowhawk’s abilities left unchecked could cause great harm, and not just to himself.
Ogion does his best to teach his pupil wisdom and patience, but when the pretty daughter of a local lord demands serious proof of his abilities, the former goat-herder can’t resist a look into his master’s ancient book for something showy. The spell he chooses will have disastrous, life-changing consequences that lead to him making the journey to the wizarding school on Roke.