Listen to the substitution lick hear and then proceed to an explanation here . The duration or pulse of musical sounds. Rhythm can be improvised just as melody can. For example in a Jazz duo with just two guitars, one guitar would normally play rhythm. And not just simply strum chords but add real rhythm by attacking the strings in a manner appropriate to the song thereby adding a true a percussive effect.
Rules are condensed versions of theoretical concepts.
For example a simple rule is to substitute the 6m7 chord for the 1maj7 chord or arpeggio.