Explain the differences between the JVM stack and heap memory, and how garbage collection is managed.