Some frogs are slimy because they are covered in a mucous coating. This coating helps them keep their skin moist which helps them breathe through their skin. The mucous often contains other chemicals, like antibacterial or anti fungals to help protect the frog.
I hope this helps you