Compilers aren't magic - they're just programs, which can be run from the command line. Visual Studio Code has a "Terminal" tab in the bottom pane of the default UI, where you can invoke the compiler. (For non-trivial applications, you probably wouldn't be running the compiler directly, but would instead be running some software that also handles linking and other stuff; in a Linux-style environment that might be make, or ant for Java.)
But retyping the compiler invocation gets old pretty quickly, so Visual Studio Code has some shortcuts available. InIn the "Terminal" menu there are entries for "Run Task" and "Run Build Task" - if you select one of these, Visual Studio Code will present you with any auto-detected tasks it can come up with from what your project looks like.