it depends how you start your node, there are 2 solutions.
1. You are running within tmux session- which allows you to detach from session and later reattach (while you detach, it’ s still running in background)
see info on tmux: https://cardano-foundation.gitbook.io/stake-pool-course/additional-material/tmux
2. Preferred method - You are starting cardano-node as a service (using systemd), then this automatically runs in background and you don’ t have to worry about it (you can set that it automatically starts when server reboots, as well if the process unexpectedly quits, systemd will restart it automatically)
see: Systemd service file for cardano-node
If you directly run cardano-node run… command in your terminal, then it will terminate as soon you disconnect from server. Therefore there are many guides with ready made startup scripts which will help you to avoid this issue.
hope this helps.
Lauris