High value items are disassembled by robot, like in the case of iPhones. https://www.youtube.com/watch?v=MC81peMLEfo
Medium value stuff is shredded into a big pile and then they leach the gold off it with cyanide. It has a much higher concentration of gold then raw gold ore.
Low value stuff is shipped to poor countries where the copper is extracted by burning and picking through the ash. Very toxic process.