"And you shall rejoice on your festival"—Deuteronomy 16:14.
The primary element of this mitzvah is the obligation to bring a Peace Offering (in addition to the Chagigah Peace Offering), known as the Simchah Peace Offering.
Also included in this mitzvah is the obligation to rejoice in a variety of ways. This includes eating meat, drinking wine (which is a paramount obligation), wearing new clothing, giving fruits and sweets to the women and children, and the Simchat Beit Hashoevah ("the Celebration of the Water Drawing") in the Temple that featured music and dancing.
The Torah requires us to include in our rejoicing the needy, the poor and the converts.
This is one of the three mitzvot associated with the festivals; the other two are Pilgrimage and offering the Festival Offering.
"And none shall appear before Me empty"—Exodus 23:15.
It is forbidden to arrive in Jerusalem for the festival pilgrimage without sacrifices to offer in the Temple. At the very least, one must bring a Burnt Offering and a Festival Offering.
"Be careful not to forsake the Levite"—Deuteronomy 12:19.
We are enjoined not to neglect the Levites, not to refrain from giving them the gifts due to them, and to invite them to join our celebration of the festivals.
"Gather the people together, men, women, and children"—Deuteronomy 31:12.
On the second day of Sukkot on the year following the Sabbatical Year, it is a mitzvah for the entire nation to be gathered, and that verses from the Book of Deuteronomy be read before them.
"Sanctify to Me every firstborn, every one that opens the womb among the children of Israel among man and among animals"—Exodus 13:2.
We are commanded to sanctify all male firstborn kosher cattle and livestock – i.e., to separate and designate them to do with them as commanded in the Torah.
The kosher firstborn is given to the priest. The animal is sacrificed in the Temple, its blood sprinkled on the altar, its fats offered thereon, and its flesh consumed by the priests.
Only a firstborn in the land of Israel can be brought as a sacrifice. Outside of Israel, the animal is still holy, but can only be eaten by a priest if it becomes blemished [as it is unfit for sacrifice].
Levites are exempt from this mitzvah.