They were given starvation diets and worked. Early in the war they shot them, put them in buses with the exhaust directed inside. They used various poisons until finally they came up with a gas they pumped into 'shower chambers' they put the new arrivals that could not work into- or those who had gotten too weak.
They also did 'medical experiments' on them- the infamous Dr. Mengele, who did all kinds of cruel things to people, most very unscientific.