Tunnelling of material particles through a classically impenetrable barrier constitutes one of the hallmark effects of quantum physics. When interactions between the particles compete with their mobility through a tunnel junction, intriguing dynamical behaviour can arise because the particles do not tunnel independently. In single-electron or Bloch transistors, for example, the tunnelling of an electron or Cooper pair can be enabled or suppressed by the presence of a second charge carrier due to Coulomb blockade. Here we report direct, time-resolved observations of the correlated tunnelling of two interacting ultracold atoms through a barrier in a double-well potential. For the regime in which the interactions between the atoms are weak and tunnel coupling dominates, individual atoms can tunnel independently, similar to the case of a normal Josephson junction. However, when strong repulsive interactions are present, two atoms located on one side of the barrier cannot separate, but are observed to tunnel together as a pair in a second-order co-tunnelling process. By recording both the atom position and phase coherence over time, we fully characterize the tunnelling process for a single atom as well as the correlated dynamics of a pair of atoms for weak and strong interactions. In addition, we identify a conditional tunnelling regime in which a single atom can only tunnel in the presence of a second particle, acting as a single atom switch. Such second-order tunnelling events, which are the dominating dynamical effect in the strongly interacting regime, have not been previously observed with ultracold atoms. Similar second-order processes form the basis of superexchange interactions between atoms on neighbouring lattice sites of a periodic potential, a central component of proposals for realizing quantum magnetism.