A couple minutes after they are swept away a countdown appears with 20 minutes. After 10 minutes the female is raped and after another 10 they would die via hanging or some shit.
During the countdown a skull will appear on the map, that's where they were taken. Don't die or leave once in the area as you will fail and lose the villager.
To add to the above:
If you have multiple NPCs "swept away" then you'll need to wait for the rescue event to trigger one by one for each of them.
Once the rape scene is triggered you'll need to kill the Prison Guard to rescue the captive instead of just busting the cage open.
Rape scene only triggers if there is a valid animation for it. If I remember right if the NPC is pregnant (with visible bump, maybe?) then the rape scene will not trigger (no valid animation), so you get the full 20 mins of easy rescue. You can immediately skedaddle after rescuing your NPC without fighting the guard. But you might want to fight him anyway.
The Prison Guard drops a valuable decoy accessory that allows you to turn whoever equips it into the sole exclusive target of all raids. This can be cheesed by putting the one who equipped it on Survivor AI, making them immune to all direct attacks. Or putting them in a decoy base surrounded by needles and spikes and other death traps, that works too. (or both!) Alternatively you can equip it on yourself instead to focus enemy attacks on you.
This accessory is so desirable people even intentionally let their NPCs be kidnapped just for it.
Defeating the Prison Guard can be very hard at low levels. That said, he has huge delays and wind-up frames for most of his attacks, and since you fight him in a village you can always pop into a house and heal up the moment you're down to 1 life. If you've already rescued the captive NPC (or if their death doesn't matter to you), you can just simply die repeatedly to the Guard, chipping his health down each time since he doesn't regenerate.
If you're using the flying raft exploit, you can move the raft to block him first, giving you much more room to dodge his attacks.
Do be aware that you have to do this entire thing without saving or reloading. The moment you reload the game, the entire rescue event gets reset and you have to wait for it to trigger again. Or if you already rescued the NPC (or botched their rescue and they're dead), then the event is already over but the Prison Guard gets removed on reload.