Solids like faeces settle at the bottom and are removed with a scraper. This is the sludge. A skimmer removes the floatable solids like oil and grease.