I assume signal is udp hole punching to get around NAT.
You scan a QR code with one device and it transfers the entire account state to the new phone.
Beyond the basic take on it there really isn't an intuitive single explanation because "simple" things like "NAT traversal" quickly turn into "Full-cone NAT to Port-restricted NAT with UPnP behind CG-NAT" individual corner cases endlessly fighting the need to just go to IPv6.