Electrical stunning in slaughterhouses involves delivering a carefully regulated electric current to the animal for a few seconds. This causes the animal to lose consciousness instantly before slaughter, ensuring that it does not feel pain during the process.