The memory on the stack contains method-parameters and local variables (to be precise: the references for objects and variables itself for primitive types). That will be automatically removed if you leave the method. If the variables are references (to objects) the objects itself are on the heap and handled by the garbage collector.
So the stack isn’t garbage collected in the same way as the heap, but stack is a form of automatic memory-management in it’s own (which predates garbage collection).
A more detailed answer is given by Thomas Pornin, look into that for more details.