GlobalLogic Interview Question

How garbage collector works in .Net?