Using "ps -ef" for example you should see one column with the PID and right next to it the PPID. The PPID is the PID of the parent process. So you can follow which process is related to another.
Killing the parent process should usually kill the the child processes too. Sometimes you have to kill them manually even if the parent is dead already.
Always try to stop your application 1st by it's usual way like via script or binary and then with a kill. Always try to just kill it before you do kill -9. kill -9 should be last resort.