It depends on the ISA. For example, x86 raises a #DE exception (same as divide overflow when the quotient doesn't fit in one register). ARM doesn't fault, you just get 0
in the destination. Division by zero not causing runtime exception on Nvidia Jetson.
(ARM division instructions only have a dividend 1 register wide, unlike x86 where the dividend is twice as wide as the divisor or quotient. ARM division can thus only overflow on INT_MIN/-1, other than divide-by-zero.)
In terms of an ALU, you have to build one that checks for that and handles it as a special case. What the rest of the CPU's internal logic does
(I'm assuming you mean integer division; FP usually runs with exceptions masked...)
What the OS does with a division exception depends on the OS. But if it's Unix-like, it has to deliver SIGFPE (arithmetic exception) to the offending process. Of course at that point it's no longer CPU-architecture, but software.