A BDSM contract is a written agreement between partners outlining expectations, boundaries, and limits for their dynamic. It acts as a guideline to ensure safe and consensual play.