Pregunta de entrevista de Aptiv

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