From my basic understating of how interrupts work, when a software or hardware interrupt is invoked, the CPU looks in the IVT located in the first 1024 bytes of memory (in real mode), gets the interrupt handler address and start executing from that location. Also, from what I understand, you can override the values in the IVT to point to your custom subroutines which can handle interrupts.
What I cannot understand is how BIOS functions work. For example for int 0x10, how does the CPU know that the interrupt corresponds to a BIOS function, and not a subroutine mapped in memory (calling the interrupt handler, whose address is stored 4 * 0x10)?