Google DeepMind Interview Question

What's the difference between stack and heap, when would you use one and when the other?