Computools interview question

Can you explain the difference between stack and heap memory in C++, and when would you use each?