Usually a program like that is defined as a service, or daemon. (On my system, startup-scripts for these are found in /etc/init.d and you can look to these as examples.)
In any case, daemon processes stay logged-on all the time. You can also launch command-line programs into the background by ending the command-line with '&' and you can also look at the command nohup. No matter how you do it, you don't have to keep a console-session running just to keep the process running.