So, the idea behind Duff's Device is just to unroll a loop, dealing in an elegant (some would say abhorrent - they're wrong) way with the "leftover" portion.
So, the canonical Duff's is copying shorts, with the copy loop unrolled to eight copy statements inside the loop. If you want to copy, say 47 shorts, the loop would need to iterate five times, and there would be seven shorts left to copy.
Duff's uses the switch to jump into the middle of the loop just far enough to copy those seven leftover shorts (47 % 8 = 7). The do-while then proceeds to run through the five full iterations.
Modern compilers will do that for you now, though there are still applications for similar code.
Hope that helps.