Actually, it is not any ordinary string; it is hair from a kosher animal. It is a Halachah transmitted to Moshe at Sinai, that all of the Parshios (Tefillin text) need to be wrapped with hair of a kosher animal. It is customary to use the hair from the tail of a calf, and the reason it sticks out of the head Tefillin is so we will constantly see it and be reminded of the Cheit Haeigel (the sin of the golden calf). This will keep us humble and prevent us from coming to sin.
The general custom is not to be too particular about how many hairs stick out of the head Tefillin, though it is preferred to have at least two.
If the hairs were never pulled out or they were but slipped back inside, some authorities hold the Tefillin are still kosher bedieved (when you have no other Tefillin and have no local Sofer to bring it and get it fixed). While others authorities hold they are not kosher until it is fixed Therefore it would be important to take care of it as soon as possible.
The Sofer Center Sofer Stam in Monsey NY 10952 845-262-0246
Rabbi Kass was ordained by Rabbi Yisrael Meir Lau, former Ashkenazik Chief Rabbi of Israel. He is certified as a Sofer for both Kesivah and Hagoah by one of the leading experts in Safrus, Rabbi Avrohom Tzvi Vosner, Rav of the Vad Mishmeres Sta”m.