To protect your webcam from being hacked, here are some suggestions:
- Secure your home network with a strong password
- Connect your computer to a secure network when possible
- Make sure your software is updated and patches installed
- Uninstall unneeded applications that can compromise your security
- Physically cover the camera when not in use
- Disable camera access when not in use