In a nutshell
Two parties agree on a shared secret over an open channel without ever sending it. They fix public numbers, each picks a private one, swap publicly mixed values, then fold in their own secret again. Both arrive at the same secret; an eavesdropper, seeing only the public pieces, can't reverse it.