break-pane turns a pane into its own window. join-pane does the opposite.
tmux join-pane -s 2 # take window 2 and put it into this window
tmux join-pane -h -s 2 # same, but side by side
-s names the source window or pane. The pane becomes part of the window you are in. Without -h the two panes are stacked, with -h they sit side by side.
The program in the pane keeps running through the move. If the source window had only that one pane, the window disappears afterwards.
Run tmux list-windows first to see the numbers, or press Ctrl-b : and type the command in the tmux prompt, which saves you leaving the session.
Try it without risk: start a throwaway session with tmux new -s scratch, use the shortcut or command above there, look at what changes, and close it again with tmux kill-session -t scratch. Nothing else on your machine is touched.
Further reading: tmux manual page (OpenBSD, official), tmux wiki: Getting Started (official)