Slaves should generally heel automatically when accompanying a free person, unless they have been instructed otherwise.
In normal circumstances, assuming there are not large crowds or extremely large, open spaces, the slave should walk three to five paces behind the master/mistress and to his or her left.
If more than one slave is following, the highest ranking/favoured slave is closest to the master/mistress and the other slaves are, in order of rank, to the first slave's left. Subsequent slaves sometimes may instead heel to their senior slaves. This is up to the slaves' owner or the free person they are accompanying.
If a slave is in disfavour or the free person is left handed, the slave will commonly heel to the right.
In very crowded areas, for instance, a busy market, where a slave could easily become separated from her owner, the slave will usually be required to heel very close to their owner, sometimes even touching the owner's shoulder or holding on to his or her belt or sash.
At a formal gathering, the slave should also stay closer.. usually 1-2 paces behind, moving closer as crowds and circumstances dictate.
Conversely, in large, open fields it is more common for a slave to heel up to five or ten feet behind.
Ultimately, of course, it is up to the will of the master or mistress in any situation.