Or you can use screen
ssh into your host, and start whatever program you want, lets say you want to do a little irc: screen Bitchx
ok now your using Bitchx in your fav channel, you want to quit your ssh session but still have Bitchx running, just close your terminal and Bitchx will still be running.
To reattach to it, log back into your host running Bitchx and type screen -r
You can do it on local machines also not just while you are ssh'd in. Though this is the only method i have used.