Sears interview question

Explain garbage collection in Java in detail.