The young Siddhartha was a sensitive young man who was brought up in the lap of luxury. He was also the most favourite child of his parents and was never exposed to the cruel ways of the world.
Then at the age of 29 years, he became aware of disease and sufferings in the world on a ride with his charioteer. Then he went back home and decided that he needed to meditate. This was his transformation from a pampered child to a learned man.
Gautama Buddha spent six long years of his life practising meditation and asceticism. He did yogic training and then abandoned the way of self-mortification to focus on mindful meditation. Subsequently, at the age of 35, he is revealed as The Buddha, The enlightened one, or The Tathagata.