Nothing is known about the Ancient One's early life. As his name implies he is possibly thousands or even millions of years old.
The Ancient One was a highly skilled sorcerer and possibly one of the most powerful sorcerers on the planet. The Ancient One eventually met Baron Mordo and began teaching him the mystic arts. However, Mordo was not pure of heart and began studying black magic.
When Stephen Strange lost the use of his hands he sought out the Ancient One and asked him to heal his broken hands. However, the Ancient One told Strange to study the mystic arts with him so that he could find the cure within himself. Stephen Strange wanted an instant cure and began to walk out of the Ancient One's temple.
On his way out Strange overheard Baron Mordo talking about his plot to kill the Ancient One. As Strange attempted to tell the Ancient One that his life was in danger he was captured by Mordo. Baron Mordo then released a spell to kill the Ancient One so that he could take the Ancient One's place. However, the Ancient One already knew of Mordo's plan and was able to use his magic to protect himself. As Mordo escaped the Ancient One approached Stephen Strange and told him that he had been tested and that there was goodness in his heart.
Stephen Strange then began to study with the Ancient One and became a powerful sorcerer himself.
It is unknown what happened to the Ancient One after this.
The Ancient One is believed to be an extremely powerful sorcerer. However, the full extent of his magic power is unknown.
In the comics
Five centuries ago Yao was a young farmer in the Himalayan village of Kamar-Taj. He studied sorcery with another villager, Kaluu. When Kaluu sought to use his power for conquest Yao thwarted him, and henceforth dedicated his life to opposing evil sorcerers. He eventually became Sorcerer Supreme of Earth's dimension. Magic extended Yao's life thousands of years and as he became an old man Yao went by the name Ancient One.
Though magic greatly extended his life, the Ancient One knew that his death was inevitable and sought to train a successor. He accepted Baron Mordo as a pupil, although he was aware of Mordo's potential for evil. Then Stephen Strange arrived, hoping that the Ancient One could cure his hands. Instead Strange found a new vocation and asked to become the Ancient One's pupil. Under the Ancient One's tutelage, Doctor Strange ultimately became the new sorcerer supreme.
Later, to prevent the demon Shuma-Gorath from entering the Earth dimension through his mind, the Ancient One persuaded Strange to shut down the elderly sorcerer's brain. Thus the Ancient One died in mortal form, but his astral form became "one with the universe."
In the 1978 movie, Dr. Strange, Stephen Strange's sorcery master was named Thomas Lindmer. At the end of the movie it is revealed that Lindmer serves an entity called the Ancient One.
This version of the Ancient One is featured as an unseen entity.