The Torah scroll is something that dates back to Creation. According to Oral Tradition, Moses was instructed by God to write down the entire Torah during the last day of his life. It was written on parchment in the same format as we have today. In fact, the Torah that Moses wrote is the "prototype" of all Torah scrolls that have been written over the generations afterwards.
The eighth and the ninth of Maimonides’s Principles of Faith discuss the accuracy of the Torah.