They are two separate programs which can run at the same or different machines. Doesn’t matter!
The Lightning „Program“ needs a connection to the Bitcoin „Program“.
Normally you run both on the same machine. This can easily be done with #[2] or a raspiblitz installation.
But you can also install and configure both on your day to day pc or one you are using only for this use case