Plarium interview question

How garbage collector works, memory states etc