The sages taught us that there are four kinds of joy during the holiday of Sukkot:
The first joy is the simple joy that we feel during a festival. As Rabbi Yehudah said in the gemara (Pesachim 109a): Men should celebrate with things appropriate to them, and women with things appropriate to them. Men should celebrate with meat and wine, and women with colorful clothes. The Shulchan Aruch brings this as the practical law. There is a commandment to rejoice on the festival with meat and wine and new clothes and jewelry, each one depending on his ability. There is also a commandment to make children happy by giving them nuts and sweets. To make them happy on the holiday is a positive Torah commandment.
The second joy is the Simchat Beit Hashoeva, about which it is said that whoever didn’t see the Simchat Beit Hashoeva never saw what happiness is. This joy took place in the Temple with many musical instruments and everyone would participate in singing G-d’s praises. The ones featuring in the celebrations were not run-of-the-mill Jews but the greatest sages who would entertain the public with dazzling acrobatics and other feats. The Vilna Gaon wrote that since today we don’t have a Temple, our main happiness should come from being in a synagogue with a Torah scroll open on the bima.
The third joy is during the festival day after the holiday of Sukkot which is Shmini Atzeret. Every day of Sukkot, G-d is, so to speak, happy with the entire world. Sacrifices were offered in the Temple corresponding to all the nations of the world, but on the last day of the holiday, Shmini Atzeret, only one sacrifice is offered corresponding to the Jewish people. G-d is happy with His people and His people is happy with Him. This is a far greater happiness than we find by other festivals, because on this day, G-d is with us and only with us. How fortunate our people are that this is the case!
The fourth joy is the greatest one of all — Simchat Torah, which follows Shmini Atzeret in the diaspora, but is combined with Shmini Atzeret in Israel. During a festival one is forbidden to clap hands, but one may do this on Simchat Torah. The sages permitted clapping in honor of the Torah. They also permitted dancing as during the weekday, even if Simchat Torah fell on Shabbat. Why did they do this? Because our joy in honor of Torah is so great on Simchat Torah.
G-d is with us the entire festival of Sukkot, but to some degree He is also with other nations. On Shmini Atzeret, however, He is only with the Jewish people. G-d’s holy Divine Presence is with us. But when Simchat Torah is added, the Torah and G-d’s Divine Presence are inside each and every Jew, just like the blessing we recite “You have planted eternal life in our midst.” Right inside of every Jew who has his own special portion of Torah that is his alone.
This is why on Simchat Torah we all have reason to be happy with the Torah, including one who didn’t merit to study Torah himself. He should rejoice greatly with the Torah, because he has Torah inside of him by the fact that he is Jewish. He should pray to G-d to help him bring out the potential of the holy power of Torah inside of him.