Chanting, or cantillation, in Judaism is the ritual chanting of words in the Hebrew scriptures. The Yiddish word for cantillation is "leyn." According to the source from My Jewish Learning (below), Ezra developed the practice of chanting the words of the Torah to get people in public spaces to pay attention to the Torah and its laws. Chanting during the Sabbath and on market days allowed Ezra to compel the attention of the people around him.
Over time, cantillation became more of the accepted practice in Jewish services. The source below states that Rabbi Akiva (ca. 50–135 CE) demanded the daily chanting of the Torah as a means of learning and studying it. Consequently, the practice of chanting became more musically ornate. Later, in the ninth or tenth century, redactors of the Torah called the Masoretes added symbols, called "neumes," to the Torah. These symbols governed how it was to be sung, and they replaced the earlier oral traditions that governed chanting. These symbols were added, along with vowels, on the tops and bottoms of letters so that the text itself would not be lengthened by the process of redacting the text. According to the site on Judaism 101 (below), chanting also helps to impart the meaning of the text.