Two ships are touching if one ship overlapped the other ship while executing a maneuver and their bases are touching as a result. A ship cannot attack another ship that it is touching.
If two ships are touching, they remain touching until one of the ships moves (executes a maneuver, decloaks, or performs an action) in a way that results in their bases no longer being in physical contact.
Sometimes a round will end with two ships touching each other, parallel, and facing the same direction. After both ships execute a maneuver, boost, or barrel roll, they are not touching (even if their bases are still in physical contact) unless they overlapped.
A ship can be touching two or more ships if it overlaps those ships and its base remains in contact with them after pulling back along the maneuver template.