Difference between failure and defect.

Failure -

When a defect reaches the end customer, it is called a failure. It is a deviation of product or software from the expected delivery or services. For Example: If you are driving a car on road, there is two ways goes:

 (a) Left goes to Goa

 (b) Right goes to Hyderabad 

You have to go towards Hyderabad it means you have to take turn at the right, but by mistake you take the left, from that position that is called as "Error" because human interaction is there and now Fault is there till you will not reach the Goa, but when you reach Goa that is a final stage which is called "Failure" because you had to reach Hyderabad but now you are in Goa.

Defect -

If the defect is detected internally and resolved it's called a defect.

It is a variance between expected and actual Result. If Product/ Software is running  at client side on beta version, an issue is caught in that application and it is deviating  the actual result from the requirement or client specifications, that issue will treat as defect in that product