[link|http://www.inspect-ny.com/septbook.htm|Here] is link with a diagram.
[link|http://www.inspect-ny.com/septic/lockwood.htm|Here] is link with some verbiage.
Basically, there is a lot of decomposition that occurs in the septic tank and then the effluent put out into the environment (the leach field). The solids that do not decompose go into the sludge that settles on the bottom. It is this sludge that is pumped out every few years.
Only a little of the decomposition occurs in a holding tank of an RV (or a boat that has one) before it is "dumped".