There are several ways for hackers to gain access to your computer but they need to somehow install a malware on your computer. Some times people make it easier for them, they install software with vulnerabilities and hackers can gain access to their computers by exploiting those vulnerabilities. In this way they skip the first part, to find a way to install their malware to your system. Many internet users have Google Chrome as their default web browser. Are you one of them? Guess what? you are vulnerable and hackers can access your web camera.
Google Chrome integrates a flash player which has serious issues and a “recent” flaw allows hackers to grab video with sound and pictures of you through your web camera without any permissions. There is also a proof-of-concept for the unbelievers posted by Egor Homakov. According to Adobe, this issue is limited to Google Chrome which means that you are safe, from this thread, by using any other web browser like Mozilla Firefox.