iServeU (India) interview question

Explain stack and it's usage.. Write code to identify prime number and sort this in accessing order..