P2P networks use various mechanisms such as ratings, behavior monitoring, and trust/security systems to ensure the quality and integrity of content.