Geralt first met Keira Metz when she literally dropped on top of him out of nowhere. During the infamous coup on Thanedd Island, Keira was defenestrated and nearly landed right on the witchers head. The next time Geralt saw her, in the swamps of Welen, was shocking in a different way - the luxury-lowing sorceress was the last person he expected to see in such a grim and barren place.
Geralt later learned the reason for this, and Keira's fate gave him ample fodder for contemplating the cruel whimsies of the wheel of fortune. Once the esteemed advisor to the now late King Foltest, she had been chased out of Temeria when she lost that rulers trust. Later she joined the Lodge of Sorceresses, which earned her the hatred of Redanias king and Nilfgaard's emperor alike. Because of this, she had gone deep undercover, posing as a cunning woman, a village witch of sorts, deep in the Welen boondocks. It was not at all difficult to tell that she despised every minute of this.
Keira then asked Geralt for another favor: lifting the curse from the tower on Fyke Isle. Curses and favors being what Geralt does best, he obliged.
If you want Keira Metz to stay alive and become available later in game to help you, during The Advancement of Learning Quest you have to chose dialogue options:
"Thousands may die. It'll be on your head." and "Go to Kaer Morhen"
If you do so Keira Metz will be alive, will help you fight Wild Hunt and will be happy adventuring with Lambert. Otherwise, it would die in such a way or another.
The Mire East