If the webcam is physically broken you'd need to buy a USB web cam.
You can try and reinstall the webcam drivers and software if you think that may help.
*Did your webcam stop working AFTER you installed Windows 8?
If so, go to the support site for your laptop and:
1) Install any DRIVERS related to your webcam (use Windows 7 or Vista versions and 32-bit or 64-bit as appropriate if Windows 8 versions don't exist), then
2) Install any SOFTWARE (Vista/7 32/64 as appropriate again)