Ned strips the Mountain of all titles & holdings for atrocities committed throughout the Riverlands, tasking Beric Dondarrion with bringing Ser Gregor to justice. I haven't read the books, but best I can piece together from the show is Thoros, who fought for King Robert against Balon Greyjoy, had been sent by the High Priestess of R'hllor to educate the people of Westeros about the Lord of Light. Only he didn't really believe, spending his time drinking and whoring instead of spreading the Lord's word. He crosses paths with Beric, who's presumably an old war buddy, and after The Mountain kills him with a lance through the heart Thoros prays beside his dead friend, and Beric miraculously comes back to life
With the Lannisters in power the 'Brotherhood Without Banners' is born in opposition, recruiting those interested in protecting the common folk against Lannister soldiers roaming the country raping & pillaging. Beric is killed 4 more times, including being captured by Lannisters and hanged. They drive a spear through his eye for good measure. The "trial" by fire against The Hound is the 6th time he dies and resurrects.
The exact timeline of all this isn't totally clear, but if you consider Ned sends Beric after The Mountain when King Robert is on the boar hunt, and Lannisters are torturing people for information about The Brotherhood when Arya arrives in Harrenhal early S2, you can get a general idea of when things took place.