Software interrupts are used to handle events that occur asynchronously during program execution. They allow the CPU to temporarily stop normal program flow to handle higher priority tasks. Common examples of when interrupts are used include handling input/output operations or timer events outside the main program.