They did not participate directly in the killing (though they did accompany the victims to the gas chambers—killing was reserved for the guards), and their primary responsibility was disposing of the corpses. They were forced into the position, but accepted it because it meant a few more months of life. After their terms, each group of Sonderkommandos was killed. They also led the revolts in Sobibor, Treblinka, and Auschwitz. Finally, a small handful survived. For personal accounts of a Sonderkommando there are a number of books including Eyewitness Auschwitz by Filip Müller.
There is a film about the Sonderkommandoes, The Grey Zone (2001) directed by Tim Blake Nelson from his play and based on the book by Miklos Nyiszli, Auschwitz: A Doctor's Eyewitness Account.