Explain the difference between a stack and a queue, and describe a scenario where you would use each.