Friendly fraud occurs when a customer disputes a legitimate transaction, often resulting in a chargeback. To prevent friendly fraud, merchants can implement measures such as clear billing descriptors, robust customer service, and thorough transaction documentation to provide evidence in case of disputes.