If it is an external webcam, find where it is connected to the computer, and make sure the cable isn't loose. Also, some webcams require manual activation. For example, Packard Bell, MSI and Lenovo laptops have webcams that are activated by pressing the Function key and F6.
It is possible the webcam has an updated driver that is causing a conflict. This is especially true if an updated version of Windows has been recently installed. Most webcam drivers can be downloaded from the manufacturer's website. After downloading, install the new driver, following any instructions.
Go to Start, then Control Panel and click on Uninstall a Program. Search for the webcam software after the list populates, select it and click Uninstall. Wait for the program to finish uninstalling, then restart the computer. Once Windows has finished booting up, reinstall the software for the webcam. If the software disk is unavailable, many manufacturers host their device software for downloading.
Some webcams utilize third-party software such as Java, Flash or Quicktime, so make sure these programs are up-to-date. DirectX is used for all video processing, so this needs to be up-to-date as well. Finally, check the video capture settings on the software being used.