are carefully hand-written by a sofer (scribe). A sofer must be even more G-d-fearing than a ritual slaughterer (shochet) - because a shochet who errs can cause people to transgress a commandment on one animal alone, while a sofer may prevent people from fulfilling the positive commandment of laying tefillin every day.
In order to become a worthy sofer, one must practice diligently - not only writing, but also preparing the quill and the parchment. He must be extremely knowledgeable in the halachot (laws) of "Stam" - the writing of Torah scrolls, tefillin and mezuzot. Such expertise is often shown by Rabbinic approbation.
Sefaradim use a reed for writing the verses, while Ashkenazim write with a feather.
It is imperative that the verses be written in proper order - Kadesh (Sanctify), V'haya Ki Y'viacha (When He brings you to the Land), Sh'ma (Hear O Israel), and V'haya Im Shamo'a (If you hearken). If the verses have not been written in this order, they are unacceptable, and must be discarded to genizah (for burial).
The letters and words of each passage must be written in the order in which they appear in the Torah. This is a law that applies only to tefillin and to mezuzot, but not to Torah scrolls.
The sofer writes in ink produced from gall-nuts and blue vitriol. He writes on parchment - actually, processed leather - that has passed through all the stages of lime-and-salt processing, stretching, sanding and smoothing.