A safeword is a code word used in BDSM for a submissive (or dominant) to unambiguously communicate his physical or emotional state to the other part, typically when approaching, or crossing, a physical, emotional, or moral boundary.
This is extremely important if the scene involves any play that could be harmful, but is just as important in light play as well. Even if you are just using a toy, a safeword is important to have. You never know when something out of the ordinary will occur.
Common sense: they should not sexually related and should be very easy to remember. Green, coconut, milkman for example. Bad safewords: anything that can be misconstrued as part of play, such as don’t, stop, etc.