Pergunta de entrevista da empresa Aptiv

Difference between HW and SW interrupt? What does volatile do?