Pane commands like swap-pane and join-pane want a source and a target. Typing pane numbers from another window is fiddly, so tmux lets you mark the source instead.
Ctrl-b m
That marks the current pane, and its border gets a highlight. Now go to any other window, pick the pane where you want it, and run one of these from Ctrl-b ::
swap-pane
join-pane
Without a -s argument, both commands use the marked pane as the source. swap-pane trades places with it, join-pane pulls it into the current window as a new split. I like this a lot more than working out whether it was 2.1 or 3.1.
Ctrl-b M clears the mark, and pressing Ctrl-b m on the marked pane again toggles it off. Only one pane on the whole server can be marked at a time, so marking a new one silently moves the mark.
If you want to see it in your status bar, the format #{pane_marked} is 1 for the marked pane, which works nicely with a conditional like #{?pane_marked,M,}.
Further reading: tmux manual page (OpenBSD)