I have 3 teens: 2 girls and 1 boy. I tell them not to walk down empty streets that aren't residential. In the daytime I point out streets I would feel nervous on alone at night. If they're walking home and feel nervous about someone they should turn into the next clearly occupied house as if it were theirs, ring the doorbell and tell the person they're scared.
In reality, though, there's often nothing you can do.
When I was 21 I was followed in the metro in central Paris on a Sunday morning on the way home. He creeped me out so I changed carriage and thought I had lost him. When I walked into my apartment building I felt someone behind me and held the door for them. Then, going up the stairs he threw me against the wall, tried to assault me, and (probably accidentally) stabbed me in the neck with my key that I was holding in my hand. He ran off when he saw the blood. Police were useless.
That was broad daylight in a nice part of Paris, I had my key in my hand and that was what hurt me. I needed stitches. (the key was in my hand to open my apartment, though, not for protection).
In hindsight I'm sort of glad it happened then, and not at night as I would have then been afraid to ever go out at night again. I was forced to carry on living my life as never leaving the flat again wasn't an option.