If two adjacent letters in the Tefillin are connected to one another, the Tefillin are invalid for use, as Halacha requires that each letter is entirely surrounded by blank parchment. In such a case, the Tefillin can be fixed by scraping off the excess ink that connects the two letters. As long as both letters are clear and identifiable, the Tefillin may be fixed in this manner. The Shulhan Aruch (Orah Haim 32:26) rules that this may be done even if these two letters are in the Name of Hashem, and this does not constitute erasing the divine Name. When one scrapes off the excess ink in this case, his intent is to fix the written Name, not to erase it, and, moreover, one removes the extra ink, and not ink from the actual Name. Therefore, this is entirely permissible and an acceptable means of making the Tefillin valid for use.
If some of the text of the Tefillin has begun to fade, a Sofer should repaint the faded words to blacken them. However, this may be done only if the letters are still recognizable. Halacha requires that the text of the Tefillin be written in its proper sequence, and thus if a word has been completely faded to the point where it cannot be read, repainting the words would amount to rewriting them from scratch, and the text would thus end up being written out of order. Therefore, faded letters or words in the Tefillin may be blackened only if the Tefillin are still valid, which is determined by whether they could still be read by a child of average intelligence. Assuming the text could still be read by such a child, the Sofer can blacken the letters or words in question and the Tefillin remain valid for use. If, however, the words have faded to the point where a child cannot read them, the Tefillin cannot be repaired.
Summary: If two letters of the Tefillin are touching one another, the excess ink should be scraped off, and this may be done even if the two letters are in the Name of Hashem. If some words in the Tefillin have faded, the Tefillin remain valid if a child of average intelligence can still read the words, and a Sofer should then blacken the text in question. If the words have faded to the point where they cannot be read, the Tefillin are invalid and cannot be repaired.