The main causes are -
1. Power failure or fluctuation, especially when you're accessing the hard disk, i.e., if you're reading or saving some data when the power fails.
2. Mechanical shock, especially while the computer is running. HDDs can tolerate more physical shock when power is off than when it's on.
3. Virus. Some viruses can create what appears to be bad sectors.