Kosher law is actually complex. The initial slaiughter- simply put though: the animal's wind pipe and major throat arteries are cut with an extremely sharp blade. The animal loses consciousness almost imediately from the loss of blood. There is little pain due to the sharpness of the blade and loss of feeling from the cut.
Afterwards the animal is soaked in salt water for a speicifed period of time to remove all blood.