Duny, also known as Jez and also Urcheon of Erlenwald, was an alias used by Emhyr var Emreis, the Emperor of Nilfgaard and the husband of Pavetta and the father of Ciri.
He also claimed to be the illegitimate son of king Akerspaark of Maecht whilst using this disguise.
He was featured in the short story "A Question of Price", in The Last Wish collection and mentioned in Times of Contempt, Baptism of Fire and The Lady of the Lake.
What does this have to do with Geralt and Ciri though?
Well, this:
When Geralt first met Duny, he claimed to have been cursed since birth, never knowning the reason for it, nor who had cast the spell. From midnight to dawn, he was a normal man, but from dawn, he turned into a creature with a bristly muzzle which resembled something like a cross between a hedgehog and a boar. As the people in Maecht were very superstitious, his father wanted to hide him because spells and curses known to afflict the royal family could prove fatal for the dynasty. One of the king's knights took Duny away from the court and brought him up as his own, wandering the world until the knight died, leaving the young man alone in the world.
He had been told that a child of destiny could free him from the curse. One day he found King Roegner of Cintra wounded in a ravine and as a reward, King Roegner promised him "whatever he had left at home without knowing or expecting it"
[Which is also called the Law of Surprise, usually envoced by witchers to get new recruits, children bound in such a way by destiny seem to have a higher chance to survive the trial of grasses, sources on this vary though. Geralt himself doubts this. Added by Kad]
in effect creating the perfect conditions for this child of destiny.
At this point I personally doubt Sapkowski had the whole Witcher Saga in mind and the whole Emhir=Duny thing came up way later down the road. At this point this was just another short story without greater aim.
Although princess Pavetta was to be wed when she was fifteen years old, Duny visited her one year before, and they secretly fell in love. When the following year, the queen gave a party for Pavetta's birthday, he appeared at the feast and announced that from her birth, the princess had belonged to him, and that he had now come for her.
After Pavetta confirmed her wish to be with him, an uproar erupted. In the ensuing fight, Geralt saved Duny's life, and later, because of this Duny promised to give up his own child to be trained as a witcher.
[Geralt at that point really did not want to envoce the Law of Surprise, he even warns Duny several times before he finally spits it out. Added by Kad]
When the fight was over, and the mood had calmed down, queen Calanthe gave in and agreed to their wedding. When the sun rose, and Duny did not transform into a beast, and so he knew that the curse had been lifted. After thanking Geralt, he and his future wife were surprised with the news that Pavetta was pregnant, and Duny was soon to be a father.
When the child was born, they named her Cirilla.
This is where it gets strange, probably because Sapkowski made this up during writing the last books:
To make it short. Geralt returned some years later and could have taken the six year old Ciri with him. He didn't, which made the bond the two share even stronger.
When Ciri was around four or five years. Duny/Emhyr planned to return to Nilfgaard, he used Vilgerfortz' help and teleportation magic for that, but hadn't thought about Ciri's strong will. She ran away before the journey strated and Duny noticed too late to delay the magic departure.
Emhyr back in Nilfgaard, with a dead Pavetta who didn't survive the journey, overthrows the non legimit current ruler of Nilfgaard who in turn had overthrown Emhyr's father beforehand and banned Emhyr in the first place.
(According to him with some loyal henchmen who also helped him flee from the ursurpers men)
Some time before dueing his early exile, he "made the plan" getting married with Pavetta to use the power of her family's blood - which honestly does not make too much sense in the books as well - he must have heard about the the prophecy concerning the power of the Elder Blood during his exile.
According to this, if he managed to marry Pavetta, his grandson would rule over the whole world (that's overly simplified, but details on that are already provided by others in this topic.)
So he bound himself to Pavetta to get rid of the curse and in possession of the Elder Blood.
Where he heard about the prophecy - maybe Melitele knows - he never gets too specific on that.
None of this is provided with too much detail in the books, probably because otherwise some inconsistecies would have appeared, that would not have been fixable.