Distinguishes a product as being spoiled or defective

After a product is inspected, some units may be classified as spoiled and others as defective. What distinguishes a product as being spoiled or defective?