The islands were first settled by the Bantu peoples from mainland Africa, who mixed in with the Malagasy people from neighboring Madagascar. To this day, the people here mainly speak a Swahili dialect known as Comorian, with a minority speaking Malagasy. These two communities were joined by the Arab traders from Yemen who brought their culture and religion with them, resulting in the islands becoming ruled by sultans by the time the Europeans first arrived in the 16th century.
The first Europeans who came, the Portuguese, weren't interested and passed on, so the islands remained independent until Madagascar (then an independent kingdom) annexed the entire archipelago. France purchased Mayotte in 1841, then the rest of the islands in the 1870s, forming "Mayotte and the dependencies" included within their wider Madagascar colony.
The islands, along with Madagascar, fell control to Vichy France for three years during World War II, but were taken by the British, who held them until 1946. Afterward, France upgraded the status of the colony to overseas territory.
Riding along the winds of change, the French were pressured, both by the Comorian and the international community, to give Comoros independence as soon as possible. The French tried to hold out for as long as they could until they gave in, promising to restore independence on 1978, but were preceded by the Comorian unilaterally declaring independence. The French recognized the declaration as valid on all islands except for Mayotte. They held a few more referendums which showed that all of the islands voted for independence...except for Mayotte. You can guess what happened afterwards.
Independence, however, wasn't a real happy ending for the Comorians. Shortly after the first president (Ahmed Abdallah), who was a staunch right-wing, came in power, he was deposed by Ali Soilih, an extreme left-wing Maoist (in a country where observing your faith - Islam, who is considered anything but compatible with communism, much less Maoist - is practically a part of your body and soul). He was deposed not long afterward with the help of a French mercenary known as Bob Denard (who actually already helped with Soilih's coup), who took control and installed the first president again as a figurehead. For almost 20 years, the country became a sort of a mini Apartheid-era South Africa by having its black population ruled by a white minority; in fact, Denard allowed South Africa to bypass their sanctions from the international community through the archipelago and also install listening posts on Tanzania and Zambia. Their rule became so bad that the Comorians eventually kicked Denard out, but he returned with a vengeance years later, even when the French already talked him not to intervene. The French assisted the Comorian government to detain and imprison him personally back in France.
Even after all of these, situations didn't improve much better. Mohéli and Anjouan had said enough and seceded from the union, apparently because of mistreatment and because they wanted to follow in Mayotte's footsteps and rejoin France. Their attempts were suppressed viciously. All this to add the still-troubled central government, which witnessed many generals attempting to stage coups to take power for themselves, unaware of the plight of the people they supposedly represent.
Now, we move on to the whole mess that is Mayotte. So, the French keeps a sliver of the Comorian territory, but it was after referendums; unlike Algeria, the Mahorians, as the French call them, really did want to become a part of France (though completely confirming it might steer this a bit into YMMV). Reasons vary, but it was probably because the island was annexed a good 30 years before the others did, not to mention becoming the center of the colony for the first few years of colonization. Regardless, the Comorians were not happy, and so did the UN, who voted on a resolution for France to give in. (Un)luckily, France realized that it is a permanent member of the Security Council, and warmingly vetoed the resolution (to this day, the question of Mayotte's sovereignty is the only time when France exercised its right to veto as a permanent member of the UN Security Council). Since then, the Mahorians have carved a different path of life from their Comorian brethren; they still speak Comorian, adopt their fishing culture, and are (mostly) Muslims, but they are more likely to identify themselves as French nowadays, even more when one accounts that their standard of living, while still below that of the Metropolitan French, are way higher than the ordinary Comorian. With the promotion of the territory into a department, the French language is also enforced in all aspects of society, so the elderly and not-so-few Comorians are wary that the French are trying to further erode the Mahorians' culture and distance their claims...maybe. Take this with a grain of salt.
Since the islands were formed from volcanic activity, you can guess there are still lots of it going around here. And considering how small the islands are, every time theres an eruption, the population of the whole island has to be evacuated.
It produces a lot of vanilla and is the worlds biggest exporter of ylang-ylang (used to make essential oil).
By the way, as noted above, it is a Muslim country, something you wouldn't expect considering how far south the islands are (its closest neighbours are Christian-majority Mozambique and Madagascar). Indeed, it is the southernmost Muslim majority country. In addition, as the country is a member of the Arab League, it is also technically an Arab country, if only nominally : Arabic is only really used in religious schools and discourses, even though being a part of the League necessitates its use as an official language ; DNA studies have shown that Comorians also have Arab DNA - And also Persian, Austronesian and Indonesian - , but not that much. On top of that, most Comorians nowadays speaks shikomori, the Comorian native language, instead of Arab.
The Comoros flag