switch they are playing on.
So the account that owns the game can play any of their owned games on any switch, but if someone else tries to play any of their games on a second switch at the same time (regardless of if its the same game or not) it will kick one of the two people off (unless they get on and go into airplane mode, which would let them play for a few hours before requiring them to connect to the internet again to reauthenticate that they own the game)