Often considered one in the same, there is actually a vast difference between a rule, a ritual and a protocol. All three have their specific uses and meanings and can all be used to benefit a D/s relationship.
Let's start with rules, a rule is set and defined and if broken, there is a consequence. We set rules to give us guidelines to work within, rules are usually set in order to maintain a routine and to discourage negative or frowned upon behaviours. Rules are typically discussed between both the Dominant and submissive, often times the Dom will have a set of rules they wish their sub to follow. But a sub can also request that a Dom set and enforce particular rules in order to keep them in line when they know they struggle with something. In doing this, the sub knows there will be a consequence or punishment for breaking the rule and hopefully will do their best to obey said rules.
Rituals are a little more complex, some may also refer to rituals as regular tasks. A ritual is a small set task that is set by the Dom and performed by the submissive, generally aimed at being a calming and grounding action. Rituals are often used when a sub comes home from work or before bed in order to focus themselves back on their submission. They help to centre the sub and settle back into their submissive headspace in order to better serve their Dom. Rituals can be as short and sweet or as long and complex as you wish, it all depends on the intention of the ritual.
Protocols are a little more rare to see as typically they are used more in 24/7 power exchange relationships. This doesn't mean you can't incorporate them into your everyday D/s lifestyle. A protocol is essentially a structured way to perform a task, displaying particular behaviours. You'll find protocols revolve more around a particular circumstance and often aren't a regular or daily occurrence. For example, a protocol may be that when you are out with your dominant at a BDSM event, you are to walk slightly behind them and keep your eyes down. This won't be used regularly unless in the instance of attending a BDSM event. The protocol does not apply unless it is within predetermined parameters.
Rules, rituals and protocols all have their place within the world of BDSM and within each and every D/s relationship dynamic. They are personal things that are discussed, negotiated and agreed upon by both Dominant and submisisve. Keep in mind they are also ever changing, they grow and adapt with the relationship dynamic. You may simply add to an existing ritual and create new ones and do away with older ones. It is solely dependant on your decisions together.