If the diaper is wet you can place it in your diaper pail, or wetbag.

For a soiled diaper, you can spray the diaper off using a diaper sprayer, dump the solids, or scrape the mess off. If you are exclusively breastfeeding you can just throw the diaper in the wash without having to do any of the other stuff, it’s water soluble so it gets taken care of in the wash.