There was of course a long history of dispute over the land before it culminated into a war; Armenia and Azerbaijan, both rarely independent in their respective histories, had previously fought over it when both countries became independent from the Russian Empire in 1918. When Armenia, Azerbaijan and Georgia declared independence, each neglected to specify their exact boundaries, leaving contested lands like Nagorno-Karabakh, Javakh, South Ossetia and Nakhichevan in a sort of gray area. After the Soviet Union annexed the South Caucasus, the Bolsheviks mulled over what to do with the Nagorno-Karabakh region. Armenia's Zangezur (modern Syunik) province was experiencing a rebellion from 1920 to 1921, and the original idea was to give the Armenian SSR control of Karabakh in order to quell it. They were all set to change the boundaries, but by June of 1921 the rebellion fizzled out, and the Bolsheviks, among them a young Josef Stalin (who usually gets blamed for this decision), decided to do an about-face, and instead created the Nagorno-Karabakh Autonomous Oblast (NKAO) within the Azerbaijani SSR in an attempt to please everyone, despite protests from Nagorno-Karabakh's citizens who would rather it have been part of the Armenian SSR. This occurred, not-so-coincidentally, when the Soviet Union was trying to lure Azerbaijan's ally Turkey toward communism. There were also economic reasons it was not made part of the Armenian SSR, since access to the area is much easier from the Azerbaijan side (although if this same logic had been applied to Nakhichevan, Azerbaijan's exclave to the south-west of Armenia, they would have given it to Armenia), and part of it could have been to weaken Armenian nationalist movements that would aspire for a unified Armenia, but the short story is it seemed like a good solution at the time; the Soviet Union expected to be around for a very long while, no one knew what would happen seventy years later. The fact still stands though that Artsakh was never under Azerbaijan's direct control, though an Azeri minority did exist there up until the war.
Things were relatively peaceful until the 1980's when the Soviet Union began to collapse, and Artsakh's citizens saw their chance to bring the issue of either joining Armenia or becoming independent to the Soviet Union's attention again. In February 1988 the Karabakh Council of People's Deputies passed a resolution requesting secession from Azerbaijan and an annexation to Armenia, with a 110-17 voting margin. Moscow, however, rejected their request. The Azerbaijani SSR loudly protested the secession movement, and anti-Armenian pogroms erupted across Azerbaijan, only spurring their push for independence. The Soviet Union, bogged down by other troubles, quickly lost control of the situation. Then of course, the Soviet Union collapsed, its republics declared independence, and with no one to stop them, war broke out. Russia played both sides of the conflict for its own profit at first, but eventually more or less sided with Armenia, while Turkey passively sent weapons and support to Azerbaijan. With the war becoming increasingly ugly, and fears of a much larger conflict erupting between Russia and Turkey, eventually a ceasefire was brokered. As stated earlier it was never much of a ceasefire, as the truce was violated on a regular basis.
Turkey closed its border with Armenia over the conflict to show solidarity with its ally, despite its many parallels with the North Cyprus conflict. It is one of the main hurdles (besides the obvious genocide issue) in Turkish-Armenian relations, as Turkey demands Armenia at least cede the buffer zones around Artsakh note , if not all of it before the borders can be reopened. It is presumed by most observers that Turkey was pressured into adding these conditions by Azerbaijan. Armenians both inside and outside of Artsakh fear a major humanitarian disaster should Azerbaijan ever succeed in annexing Artsakh, and this is not helped by warlike and racist statements regularly issued by Azerbaijan's president (who on more than one occasion has laid Azeri claim to all of Armenia, even the internationally recognized bit), not to mention lingering memories of the anti-Armenian pogroms. In April 2016, amidst controversy surrounding the Azerbaijani president's off-shore hidden wealth revealed by the Panama Papers, Azerbaijan launched the first major offensive against Artsakh since 1994, briefly capturing some villages and positions and committing atrocities against civilians before being driven back and a ceasefire being reinstated by the Azeri side; this provided everyone involved with a sobering taste of what an all-out war would look like. Since then, attempts have been made to return the two countries to the negotiating table; however, the OSCE's proposal for Artsakh to sacrifice some surrounding territories to Azerbaijan in exchange for peace has been rejected by the Armenian side because of how vulnerable that would leave Armenia and Artsakh if Azerbaijan decided to unleash an offensive once claiming these territories. As of yet, the conflict is at a standstill.
It's because of this conflict that Armenia (and by association, Artsakh itself) has to rely on its borders with Iran and Georgia to survive, luckily the US and its allies have usually looked the other way with regards to Iran's international trade sanctions in this case (although the US has tried to put pressure on Armenia to stop doing business with Iran). On the other side, despite that the land itself doesn't have much monetary worth and most of their money comes from Caspian oil deposits anyway, Azerbaijan's government has used the Karabakh issue to instill a national unity by demonizing the Armenians as a common enemy, thus helping the Aliyev dynasty stay in power. It is feared by the Azeri government that if Artsakh were to become recognized by the UN, many of Azerbaijan's other disenfranchised minorities would want independence as well.
The name of Republic of Artsakh refers to the ancient Armenian province that existed in the area from around the 1st century B.C. into medieval times, and is used interchangeably with Nagorno-Karabakh (a name which only came about in the 1600-1700's). The population is predominantly Christian, with most Christians being affiliated with the Armenian Apostolic Church. Several historical monasteries are popular with tourists, mostly from the Armenian diaspora, as most travel can only take place through its border with Armenia. Also popular is the recently excavated ancient city of Tigranakert, one of four cities given that name during the reign of Tigran the Great in the 1st century B.C. It provides a powerful counter to the Azeri claim that Armenians are new to the region. Traveling to Artsakh is relatively safe as long as one stays away from the ceasefire lines, and doesn't mind being banned from traveling to Azerbaijan afterward and added to their black list (Azerbaijan sees it as unauthorized trespassing into their borders; though if you're an ethnic Armenian you're automatically banned from entering the country anyway). This happened to Anthony Bourdain in 2017, although he likely expected it. An airport has been built in the capital city of Stepanakert to make the country more accessible, though it remains out of use due to threats from Azerbaijan, which prompted the countries in the OSCE Minsk Group to convince Armenia to hold off on it. The war destroyed a lot of the country's infrastructure, and there are still land mines here and there, but in all the citizens have done their best to carry on since the ceasefire. Efforts to de-mine the country and rebuild toppled buildings are still on-going, but have come a long way in the last two decades.
The Artsakhi flag