MathWorks Interview Question

What is garbage collection, difference between private and public.