The Hebrew text of the Old Testament is called the Masoretic Text because in its present form it is based upon the Masora—the Hebrew, textual tradition of the Jewish scholars known as the Masoretes (or Masorites). The Masoretes were rabbis who made it their special work to correct the faults that had crept into the text of the Old Testament during the Babylonian captivity, and to prevent, for the future, its being corrupted by any alteration. They first separated the apocryphal from the canonical books, and divided the latter into twenty-two books, being the number of letters in the Hebrew alphabet. Then they divided each book into sections and verses.
There is a great difference of opinion as to when the Masoretic Text was written, but it was probably completed in the 10th century AD. Several editions existed, varying considerably, but the received and authoritative text is that of Jacob ben-chayim ibn Adonijah, who carefully sifted and arranged the previous works on the subject. It was published in 1524.
Although the existing copies of the Masoretic Text date back only to the tenth century, two other important textual evidences bolster the confidence of textual critics that in the accuracy of the Masoretic Text. The first is the successive discoveries of manuscripts at Qumran by the Dead Sea since 1947. These revealed portions of manuscripts several centuries older than any previously known. The second is the comparison of the Masoretic Text to the Greek translation called the Septuagint (or LXX), which was written 200—150 BC. The oldest existing manuscript of the LXX dates to the fourth century AD. Both the Septuagint and the Dead Sea Scrolls are amazingly consistent with the Masoretic Text, assuring us that God was indeed divinely and sovereignly protecting His Word through thousands of years of copying and translating. For more information, see "Ancient Manuscripts That Validate the Bible’s Old Testament," published by Josh McDowell Ministries here.