Accenture interview question

What is garbage collection and how does it work?