I have heard that intelligence agencies and hackers can illicitly gain access to a computer's webcam and microphone and keep a close eye on people using suspicious programs or malware.
Is there any way to check if such thing is happening to you and are there any mechanisms to avoid it on platforms like Mac OS, Linux and Windows?