Software fault is also known as defect, arises when the expected result don't match with the actual results. It can also be error, flaw, failure, or fault in a computer program. Most bugs arise from mistakes and errors made by developers, architects.
Following are the fault types associated with any:
Business Logic Faults
Functional and Logical Faults
Faulty GUI
Performance Faults
Security Faults
Following are the methods for preventing programmers from introducing Faulty code during development:
Programming Techniques adopted
Software Development methodologies
Peer Review
Code Analysis