What is the meaning of wearing a red string?

My friend returned from a trip to Israel with a red string tied around her wrist. What can you tell me about the meaning of wearing a red string?

Wearing a red string – or tying a red string on baby’s bassinet – is one of many Jewish folk customs intended to “ward off the evil eye” or protect yourself or others from harmful forces. (Another popular custom is to spit three times (or mimic spitting by saying “pooh, pooh, pooh”) when sharing good news.)  

Wearing a red string for protection has become popular in recent decades, and probably was not ever unique to Judaism. Today, these red strings are widely available – from street vendors in Jerusalem to online retailers.

The original meaning of the practice is unknown. There is one biblical reference to a red string (in Genesis 38:28) used to mark the birth order of twins: “And just as she was giving birth, one put a hand out and the midwife took [it] and tied a crimson thread on its hand, saying, "This one came out first.” References to wearing or tying a red string appear in other ancient Jewish texts, but the meaning and context is unclear.