Shemini Atzeret ( – "the Eighth [day] of Assembly") is a Jewish holiday of the (Northern Hemisphere) autumn. In Israel, the date of the holiday is 22 Tishrei on the Hebrew calendar. Outside of Israel, it is two days long, on 22-23 Tishrei. On the Gregorian calendar, Shemini Atzeret comes in late September or early or middle October.

The holiday is best known for the celebration of Simchat Torah (שִׂמְחֵת תּוֹרָה), "Rejoicing of the Torah", when Jews finish the annual cycle of reading the whole Torah out loud in synagogue. Outside Israel, Simchat Torah is celebrated on the second day of the holiday. Most people outside Israel use the name Shemini Atzeret for the first day only. They call the second day Simchat Torah because of this celebration. In Israel, the one day of the holiday is called by both names.

In some ways, this holiday is part of the holiday of Sukkot. The shemini ("8th") is the 8th day of Sukkot. In other ways, this holiday is a separate holiday on its own, and not part of Sukkot. 

Shemini Atzeret is an important Jewish holiday. Like on Shabbat and other important Jewish holidays, work is not allowed on Shemini Atzeret.

Sources in the Torah
The holiday of Shemini Atzeret is in the Torah (Pentateuch) twice, at  and at . The Torah does not say much about the holiday, though.
It does not directly give the date of the holiday. Instead, it sets the date of the holiday as "the eighth day" (Hebrew: yom hashemini), meaning the eighth day of Sukkot.
It describes the holiday as atzeret, a holiday of assembly, conclusion or stopping.
It states that work is not permitted on this holiday. 
It lists sacrifices that are to be brought to the Temple in Jerusalem on the holiday.

Shemini Atzeret and Sukkot
The Torah says that this holiday falls on the eighth day of Sukkot. However, in the same paragraph, the celebrations of Sukkot are described as lasting seven days, not eight. The Talmud writes about this apparent(def. 2) problem. At the end of the section, the Talmud says that at the same time,
"Shemini Atzeret is a separate holiday on its own," and
"Shemini Atzeret is the final holiday of Sukkot."
The laws and customs of Shemini Atzeret show both pieces of the holiday.

How Shemini Atzeret is a separate holiday
In prayers, the holiday is described as "Shemini Atzeret", not "Sukkot".
The blessing said when a new holiday begins is said on Shemini Atzeret.
Ritual objects used during the seven days of Sukkot, including the sukkah, the lulav and the etrog, are not used on Shemini Atzeret.

How Shemini Atzeret is part of Sukkot
The name includes the word shemini, "eighth", meaning the eighth day of Sukkot
Shemini Atzeret is included with Sukkot in the season called z'man simchatenu, "Time of our Joy"
Shemini Atzeret is considered part of the "Three Pilgrimage Festivals". Those festivals are Passover, Shavuot and Sukkot. Shemini Atzeret is part of Sukkot for this purpose.
The requirement for Jews to be happy on Sukkot goes all the way through Shemini Atzeret.

How Shemini Atzeret is celebrated

Some Jewish holidays have special rituals, like the Seder of Passover or the sukkah, lulav and etrog of Sukkot. In the Torah, there are no rituals like that for Shemini Atzeret. But starting at the time of the Talmud, Shemini Atzeret became the holiday for finishing the annual reading of the Torah in the synagogue. The celebration of that—called Simchat Torah— has become the main feature(def. n2) of the holiday.

Simchat Torah
In synagogues, one section of the Torah is read on every Shabbat of the year. The last section, from Deuteronomy, is read on the holiday of Shemini Atzeret. Over the last 1000 years, the reading of the last section has become a big celebration called Simchat Torah, or "Rejoicing of the Torah". This celebration is so important that the whole day of the celebration is called Simchat Torah. In Israel, this celebration happens on the single day of the holiday, 22 Tishrei. Outside of Israel, it happens on the second of the two days, 23 Tishrei.

History
The name Simchat Torah does not appear in the Torah or the Talmud. The Talmud says that the final section of the Torah is read on Shemini Atzeret. But it does not use the name Simchat Torah, and it does not describe a special celebration. The first reference to any kind of celebration comes from the perioddef. n1 of the Geonim (7th-11th centuries CE). That source mentioned the custom of dancing with the Torah, which is still a custom today.

In the 9th century CE, the custom of reading the first chapter of the Prophets () appeared. 
By the 14th century, the name Simchat Torah is used. The custom of beginning the new yearly cycle of Torah reading with  immediately after finishing the old cycle began by then.
By the 16th century, most of the current practices of Simchat Torah were in place.  This includes the custom of hakafot ("circuits")—marching with the Torah around the synagogue seven times. 

In modern times, Simchat Torah has become a day to show Jewish pride in public.  
In the Soviet Union, there was danger if Jews celebrated Judaism in public during most of the year. But on Simchat Torah, there were large public celebrations.
In the United States, people take the Torahs out to the street to dance on Simchat Torah.
In Israel, Simchat Torah is celebrated on 22 Tishrei. But on the night of 23 Tishrei, many Israeli Jews dance with the Torah a second time. This way, they dance on the same night as Jews around the world.

Simchat Torah evening
Simchat Torah evening is a  and child-friendly holiday. After the regular holiday evening prayers, all the Torahs are taken from the . Members of the synagogue march or dance around the synagogue seven times with the Torahs. Each time around the synagogue, the people pray "Save us! Answer us on the day we call!" Sometimes the dancing moves from the synagogue to the street outside. Sometimes the dancing can go late into the evening, with extra songs and prayers added. One very common custom is for people—especially children—to march or dance with flags, sometimes with candles or apples on top. At the end of the dancing in most synagogues, a piece of the last Torah portion in Deuteronomy is read in public. In Orthodox and Conservative synagogues, the very end of Deuteronomy is not read at night. But in Reform synagogues, it sometimes is.

Simchat Torah morning
After the regular holiday morning prayers, the dancing and marching of the previous night are repeated. After that, every  adult member of the synagogue is called to the Torah for an aliyah (honor), says blessings, and has several verses of the Torah read. Depending on the size of the synagogue, this can take a long time. Different synagogues have different ways to do this:
Some synagogues do not add to the five aliyot (honors) that are normal for a holiday. Instead, they call members to the Torah in groups. Each eligible adult is included in one of the groups.
Some synagogues repeat the reading many times until every eligible adult is honored.
Some synagogues take out extra Torahs and read them in parallel in different rooms until every eligible adult is called.
Once all eligible adults have received an honor, the celebration comes to its highest point. The last three honors go to distinguished members of the synagogue:
Kol HaNearim ("All the Youth"): All the children in the synagogue go up with one adult for a group honor. It is customary to say the following verse from the Torah after this honor:
May the angel who saves me from all evil bless the children, and may my name be declared among them, and the names of my fathers Abraham and Isaac, and may they increase in number like fish within the land.
Ḥatan Torah ("Bridegroom of the Torah"): This person's aliyah (honor) is the reading of the last verses of the Torah.
Ḥatan Bereshit ("Bridegroom of Genesis"): This person's aliyah is the reading of the first verses of the Torah.
For all of these honors, the person honored stands under a tallit (prayer ) held open like the ḥuppa, or , in a Jewish wedding.

Hakafot Shniyot
In Israel, it has become common to add an extra night of celebration to Simchat Torah. This is called Hakafot Shniyot (Second Circuits). It happens on 23 Tishrei, the same night as Jews in the rest of the world celebrate Simchat Torah. This is a way for Jews around the world to show Jewish pride together. Because the holiday of Shemini Atzeret is over after one day in Israel, holiday restrictions do not apply. So Hakafot Shniyot can include things not normally allowed on Shabbat and Jewish holidays (like bands and photography).

Practices from Sukkot
The Torah states that it is a requirement for Jews to be happy on Sukkot. The Talmud writes that this requirement lasts for eight days—the seven days of Sukkot and Shemini Atzeret. As part of this, Hallel is said in synagogue during the morning prayers of Shemini Atzeret.

In Israel, this is the only practice from Sukkot that continues into Shemini Atzeret. In every other way Shemini Atzeret is a separate holiday with separate practices.

Outside Israel, this is complicated by the Jewish law of adding an extra day to every Biblical Jewish holiday except Yom Kippur. The holiday of Sukkot, which lasts seven days in Israel lasts eight days outside Israel. But the eighth day is also the first day of the separate holiday of Shemini Atzeret. Sometimes the rules for the two holidays conflict. Figuring out the conflicts can be complicated. But the general rule is that 
If the rules for the two holidays conflict, Shemini Atzeret rules win.
If the rules do not conflict, Sukkot rules can be included on Shemini Atzeret.
In practice, what happens only outside of Israel is that
The Four Species (lulav and etrog) are not used on Shemini Atzeret.
Most people (but not all) eat meals in the sukkah on Shemini Atzeret. But they do not say the blessing for eating in the sukkah. And they do not sleep in the sukkah.
Psalm 27 in recited in synagogue.
If Shemini Atzeret is Shabbat, Kohelet (Ecclesiastes) is read in Ashkenazi synagogues.
None of this happens on the second day of Shemini Atzeret (Simchat Torah), because it is no longer an extra day of Sukkot.

Notes

References

Jewish festivals and holidays