Nobody knows the answer to this question yet. But as GRRM says, everything shall be explained in due time.
The three-eyed Raven is beyond a doubt Brynden Rivers, son of King Aegon IV and known as Bloodraven.
The last greenseer, the singers called him, but in Bran's dreams he was still a three-eyed crow. When Meera Reed had asked him his true name, he made a ghastly sound that might have been a chuckle. "I wore many names when I was quick, but even I once had a mother, and the name she gave me at her breast was Brynden."
ADWD-Bran III
We know that Bloodraven must have faced two near-death events:
- He suffered a greivous injury to his head/face in duel against his half-brother Aegor Rivers aka Bittersteel. He lost his eye as a result but survived.
- He was lost beyond the wall so it is possible that he may have faced a near-death experience out there due to exposure if nothing else.
We have example of Jojen as well. Three eyed raven came to him when he was almost fatally ill. He came to Bran when he was also near-death.
Summer raised his head from Bran's lap, and gazed at the mudman with his dark golden eyes.
"When I was little I almost died of greywater fever. That was when the crow came to me."
"He came to me after I fell," Bran blurted. "I was asleep for a long time. He said I had to fly or die, and I woke up, only I was broken and I couldn't fly after all."
ACOK-Bran IV
So it appears that a near-death experience is always involved in the process of being chosen by the Old gods.
NOTE: Will be edited to add references.