Doujin is the equivalent to a social clique in English but is mostly referred to Japanese groups who have an interest in hobbies and cultures relating to media such as Animation, Writing, Comics, Music and Video games. It was originally for groups of fans who would enjoy published and work together to make fan works of existing media series or original media in the hopes of eventually working professionally but western views perceive it as meaning fan fiction despite it not always relating to existing media (though a lot does) this is largely due to Doujinshi which refers to self-published print works which is predominantly indie comics. Though this also has its own meaning to the West as most Doujinshi published outside of the west are erotic/pornographic comics so Doujinshi and Doujin has connotations to pornography in the west which is known as Ero-Doujinshi in japan.

The earliest form of Doujin groups were writing groups in the 1800s but focusing on comics the comic doujin groups became popular in post-WWII Japan with many incredibly influential Japanese comic artists such as Fujio Fujiko (Doraemon) in this early stage Doujin groups for Comics were more of group with a focus on becoming professionals in the industry while in the 80s Doujin groups would also be for people who are fans of media creating groups such as the animation studio Gainax (Neon Genesis Evangelion) who started by making fan animations of TV shows they liked. Since Japan didn’t start creating comics and animated series until the 50s-60s they weren’t as organized as the west who were doing it since the early 1900s so there weren't any studios as huge as Marvel or DC in the east, this has led to many studios coming from these Doujin groups.

Nowadays Doujin groups are still popular but independent creators also create Doujinshi, Doujin-games, etc. Japan’s indie scene is still relatively focused on getting published professionally unlike the west where many believe indie is better as you get more creative control for your works, mostly due to the idea that mainstream western comics are all Superhero based. In Japan however comics aren’t limited to such restrictive genres with most studios that publish works mostly wanting you to appeal to an age group more than a genre.
The most common Doujinshi artists that end up becoming professional comic creators at some point tend to start doing Ero-Doujinshi making them incredibly popular. (In the west they’re by a large margin the most popular Independent Japanese comics consumed) Ero-Doujinshi artist often get hired by magazines to create romance comics, such as Nanashi (Don't Toy with Me, Miss Nagatoro) or if they’re parodies of existing media they might work on the media especially if its a series, examples being working on art for video games or published collaboration edition comics.

Finally I want to talk about a series that has had a huge doujin clique and fan works made for it, the video game series Touhou Project. Touhou Project has had an incredible amount of fan works made as the creator, Jun'ya Ota (ZUN), has mostly been the sole developer, artist and musician for the entire series. As ZUN has preferred to keep adaptations of Touhou by professional companies limited, fan creation has been the main media made around it creating Doujinshi, Fan Animation series and Music. This is what led to its success as the fan works advertised the Project and also led to a loyal fanbase in the west who also got involved in fan works on it. The only similar western example would be the Undertale game (Which ironically became popular in Japan after the huge western fanbase.) It has the most modern doujin groups for a Japanese media series. That was a very brief rundown of the Indie scene in Japan as this only touches the surface of it.
Doujin
Homepage