There are two main roles for a toilet slave within BDSM play.
The first is where the slave acts as a maid and tends to the Master or Mistress' needs as the do their toilet. The slave will wipe their Master's bottom, clean up for them, and generally handle any of the messy details.
As the more extreme form of play, the toilet slave acts as the toilet itself. Similar to piss drinking, now the toilet slave is responsible for eating the faeces (shit) of their Master or Mistress (scat/shit slave). Because of the humiliation and revulsion this causes most ladies, only rare slaves will permit this sort of play. This sort of play is often called "scatology" or "scatological play".