Arista Networks Interview Question

What exactly happens when you forcefully terminate a infinite while loop running on a single core processor. Describe the actual process of how the computer knows when to forcefully terminate the loop.