You close your view of the session and the work goes on. That is what tmux is for.
Ctrl-b d
You return to the plain shell, and tmux prints [detached (from session name)]. Everything in the session keeps running, including long commands. Reattach with tmux attach, or tmux attach -t name when there are several sessions.
If your SSH connection drops, tmux detaches for you. The session is still there when you log in again. The shortcut is for when you decide to leave on purpose.
Use tmux ls to see what is still running. A session that is forgotten there keeps using memory, so close the ones you no longer need.
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)