Pergunta de entrevista da empresa ZTE

Can you explain how JVM works and the difference between heap and stack?