In the simplest form the entire language extension in VS Code can be ~15 lines of code that forks the server process and talks with it over stdio. But in complex cases you can:
- Write the entire language server in the extension itself.
- Have your code hosted on a different machine or Docker container.
- Run the editor in a browser and get language support though a service worker or a TCP connection to a remote server.
LSP supports all of this seamlessly because it is agnostic about the transport layer.