The core of LXD is a privileged daemon which exposes a REST API over a local unix socket as well as over the network (if enabled).
Clients, such as the command line tool provided with LXD itself then do everything through that REST API. It means that whether you’re talking to your local host or a remote server, everything works the same way.