It breaks the distance down into smaller parts. In this case, it breaks down the 5000 pixels distance it would make within one tick into numerous parts and loops through each part, checking for collision, and stopping when it detects the collision.
I made a similar example once but instead of repeating a high number of times it just consumes a time pool.
The time pool was refilled on each frame, so you could have fixed frame rate logic (good for exact collisions) with dynamic frame rate graphics. It's somewhat similar but not exactly the same and only useful if the graphics rate stays way over the fixed logic rate.