As soon as your Offensive Units have captured a Hamlet, they will return to your Castle and be sent directly to the Catacombs. Defensive Units will return to the Catacombs if the Hamlet they are collecting Resources from becomes depleted. Please note that if you recall Units manually from a Hamlet, they will not go to the Catacombs.
If, after Units are dispatched to a Hamlet, the Hamlet disappears from the Map, all Units will return to the Catacombs. This is also the case if Offensive or Spying Units are sent to a Hamlet that becomes vacant while they are travelling there.