It very much depends on the battery type:
en.wikipedia.org/wiki/Battery_recycling
And for Li-ion batteries there’s several ways listed. None of which is perfect I guess.
To digress a little:
the biggest problem are batteries that aren’t recycled at all. Thrown away. “Forgotten” inside a toy etc.
BlameThePeacock@lemmy.ca 1 year ago
The simplified answer is, they get shredded, then various processes both physical and chemical are taken to extract the important materials and the rest is disposed of. Often certain metals will dissolve in specific acids or chemicals, then you can take that liquid with the specifically dissolved metal and precipitate it out.