Innovid interview question

Explain how java garbage collector works