The Shulchan Arukh (32:1) discusses the important halacha of "hak tochot." The Torah says, regarding the writing of a get, "vechatav lah" (and he wrote for her). The gemara (Gittin 20a) derives from the verse "and he wrote" that the sofer must "write" the letters, and they cannot be carved (vehakak)." This means that the letters must be formed through writing, and not through carving. Therefore, if a blotch of ink falls on the parchment, the sofer must not carve a letter out of the ink, rather, letters must be written. This principle is called "hak tochot."
There are numerous applications of hak tochot. For example, if a sofer is writing the letter "bet," and a drop of ink spills and the letter instead looks like a "peh" and not a "bet," the sofer cannot carve out the extra ink; rather, the entire letter must be carved out and then re-written. As we discussed previously, this may be more difficult when writing tefillin, as the sofer cannot go back and rewrite a letter out of order, as the letters of the tefillin must be written in order, "kesidran,"
The Mishna Berura (32:67) cites an interesting debate regarding the following case. If a sofer wrote part of a letter, such as the top and one of the lines of an "alef" (a letter "yud" attached to a letter "vav), and ink spilled on the letter, can the sofer scrape away the spilled ink, and continue to write the letter? Some Poskim maintain that once the ink spills, the entire letter is invalid and he must erase and rewrite the entire letter. It is clear, however, that according to Maran (Even HaEzer 125:4), hak tochot is only a problem when carving out the ink finishes a letter, and not when the sofer is in the middle of writing a letter.
Summary: A sofer may not form letter by carving out ink which spilled on the parchment. There is a debate regarding whether he may scrape away ink to fix part of a letter before it is finished. Although these halachot may not be very practical for the consumer, it reminds us how important it is to purchase Sifrei Torah, tefillin, and mezuzot from reliable, God-fearing sofrim.