There are three areas of concern when it comes to the cause of diving accidents: physical, technological, and psychological.
Physical: These are the things in the dive environment that can cause physical injury, such as coral, other potentially dangerous marine life, and even the physical pressure of the water.
Technological: These are the potential equipment failures that can cause a dive accident, such as a poorly tuned regulator, kinks in your hose, or a broken Schrader valve.
Psychological: This comes down to how calm you can be underwater when something goes wrong. Panic can cause serious problems when the technological or physical problem could be managed sufficiently. When a problem occurs you need to stay calm. You can use the following to help you maintain your head during an emergency: Stop, Breathe, Think, Breathe, and Act.