MathWorks interview question

What is garbage collection, difference between private and public.