I think you're just confusing some of the concepts here. When you SSH to another computer you're connecting to it in an interactive terminal. You can run commands logged into another computer through this SSH connection.
Here I'm logged into my Macbook (unagi) as myself (smingolelli).
Now we SSH to another computer on my LAN (mulder) as another user that's local to that system (root).
$ ssh mulder.bub.lan -l root
Last login: Sun Apr 21 23:05:32 2019 from 192.168.1.95
When I'm done I simply exit this interactive SSH connection to another host and I'm back on my original Macbook host.