Friend functions are granted special access to private and protected members of a class. They're not member functions themselves but can access non-public data. This provides controlled way to expose private data to specific external functions without making it public.