You type...
$ screen
...and hit enter.
Run the command or script.
Press control-a, then d
Then you can disconnect, log out, do whatever... come back later and check on the script:
$ screen -r
Then you wonder how you ever got along without it.