But ... VSCodeVisual Studio Code is an IDE.
Sure, it doesn't ship its own compiler -- but it sure does integrate those you need via extensions.
As others have already said, compilercompilers are just programs, so they can be invoked from the command line.
Furthermore, a modern approach to syntax highlighting, code-assist and refactoring is the so called "Language Server protocol"-called Language Server Protocol (LSP). Most major IDEs -- at least IntelliJIntelliJ IDEA, Eclipse ans VSCodeEclipse, and Visual Studio Code -- understand the LSP. If a language server is available for the target language, VSCodeVisual Studio Code can interact with the language server. In case of Java, this is exactly what happens. There is a plugin for Eclipse JDTEclipse JDT that offers the power of Eclipse code-assist and syntax highlighting as a language server. VSCodeVisual Studio Code interfaces with that. The VSCode Java ExtensionVisual Studio Code Java Extension ships with Eclipse JDT and integrates it -- and the incremental Eclipse Compilercompiler -- via the LSP.
For other languages, where a language server is not available, a VSCodeVisual Studio Code extension might opt to do the parsing itself. Still, if an interpreter or compiler is available, VSCodeVisual Studio Code will integrate with those for the final step (compilation and/or execution).
Programs are composable. If there already is a program that solves your problem, you can interface with that in various ways*, and don't need to solve the same problem again. Thus VSCodeVisual Studio Code can offer compilation, but not have its own compiler -- because it uses an already existing-existing one.
* E.g., CLI (invoking a compiler), static or dynamic linking (with dllsDLL files), network (like with the LSP), and web requests (against an API).