This is because the body of a cockroach functions much differently than that of a human being (who would obviously die soon after losing his or her head!). Unlike humans, roaches have an open circulatory system with a much lower blood pressure. Therefore, when you cut its head off, it is quite unlikely that a cockroach will bleed to death. Instead, their necks will simply clot and the roach can go on its way!
Roaches also do not breath through their mouths like humans. Instead they respire through a series of holes throughout their bodies called spiracles. Conveniently, this breathing is not controlled by the roach's brain and the oxygen is carried directly to target tissues without the use of blood vessels!
And finally, because they are cold-blooded creatures, cockroaches function on much less food than your average human. They can survive for several weeks on a single meal! Scientists have noted that a roach's head can even survive the decapitation for several hours!
For the full article explaining life as a headless cockroach check out the Scientific American.