Tefillin are pasul if a tear developed on the outer wall of a bayis or between three of the four compartments of a shel rosh. A tear in the walls of two non-adjacent compartments does not disqualify the tefillin. If the compartments were adjacent, the Mechaber holds that if they are new tefillin they are kosher, but if they are older tefillin this is an indication that the leather has begun to deteriorate and they are pasul. According to the Rama, even new tefillin would be pasul since there is an opinion that holds that a tear which forms in new leather indicates that it is of poor quality.
(סעיף א, ס"ק ב-ו ו־ט-יא, וביה"ל ד"ה זה וד"ה ראשון)
Tefillin that were cut with a knife
It is clear why deteriorating leather or poor quality leather render tefillinpasul; if a tear developed on its own, there is a possibility of the tear spreading and reaching the outer wall of the bayis. The poskim are equally stringent about a tear caused by a person (knife), since it can also spread. There is a machlokes as to whether a hole is treated like a tear, and some Rishonim are stringent. A tiny hole that can only be seen with the aid of a magnifying glass is certainly not a concern.
(ס"ק ד; ביאורים ומוספים דרשו, 1-3)
Differentiating between old and new tefillin
Theoretically, there is a difference between old and new batim regarding tears (although the Rama is stringent in both cases). The Gemara defines a new bayis as one with leather soft enough that the titura stretches open when the strap in the ma’avarta is pulled. The bayis is considered old if the leather does not stretch and open when pulled. (This sign will not work if the ma’avarta is made from a separate piece of leather – see Mishna Berura siman 32 seif 201.)
(סעיף א וס"ק ח; ביאורים ומוספים דרשו, 6)
The retzuos of the shel rosh are knotted in the form of a daled and those of the shel yad are knotted in the form of a yud. Together with the shin on the side of the shel rosh, these letters spell Shakai.
According to the simple reading of the Mishna Berua and the consensus of the Acharonim, a single daled should be formed out of the knot, but there is an opinion that the Mishna Berura favored a knot in the shape of a closed mem.
The tefillin should not be glued prior to the stitching (and according to some poskim, even after the stitching) out of concern that the glue can render the stitching batul.