So, I'm a male in my late teens. I'm tall but pretty skinny, not someone who looks threatening (so I'm told). But in the dark, when people can't see well (especially if I'm behind someone), my height does not help me, and I can seem imposing. I've been aware of this for a while, and I always take steps to mitigate it.
I want to make sure that they can see me. Someone who's trying to assault another person probably won't want to make themselves very visible. Given that it's dark out, there are probably some sources of light not far off:
- Streetlamps or other lights. This may requiring waiting for a bit, unless the lights are close together along a pedestrian route. That said, in the cases where I've had to take action, I'll almost always stop and wait by a lamppost. I'd rather be 30 seconds late to wherever I'm going than scare someone.
- The area outside a store or other public building. On back streets, there might not be building lights.
- Near an intersection (preferably busy), though you may not have this option.
If you have a light source, like a phone, you can use your phone to light up your face a bit if you use it.1 The point is, make yourself visible to the other person - visible and non-threatening. You're not trying to hide; do what you can to communicate this.
All of this relies on the premise that they'll see you. If they're looking over their shoulder a lot, then you're okay. That said, I do have female friends who say they simply keep their heads down and walk faster, in which case they won't see you. At this point, I would say do what other answers suggest, and make some non-threatening noise.
But above all, make yourself visible.
1 You could also use a flashlight to light up your path - not an unreasonable thing to do at night - but be careful to not point it directly at the person. That could make it seem like you're trying to see them, or even blind them with the light. And that could be a sign of an attacker.
Manuel said something in a comment that made me think a bit:
Just to add, I'm also a young male, and I do feel nervous whenever I encounter someone in the dark, and even more nervous when it's another male. Nervous as in someone is following me, not nervous for someone feeling as if I was following them, that's just awkwardness for me. So these answers while focused on women, will definitely help almost everyone. In this kind of question I always see men answering that give me the feeling as if they never feel nervous in these situations, and can't believe it.
He's got a point. Obviously, the question is about the case of a male walking behind a female. But there are cases where a male thinks they're being followed - and yes, I have been in that situation. In that case, I actually ducked into a well-lit doorway and rummaged through my bag while waiting for the other person to pass, because I was creeped out. I don't think the guy was aware.
If I'm behind another male and seemed to be following him - unintentionally - I would probably act the same way as I suggested at the beginning. I can't recall any cases where I've done so, but then again, I can't recall any cases where I've noticed that I was accidentally following a man.