The question would mainly about how a garbage collector is included in programs written in a programming language. Let's for example take a language that uses LLVM, would the developers just write a static library with all the interfaces for the garbage collector and link it with every binary produced by the compiler. Of course this would mean that if they want to allocate to the heap the functions of the library would be used.
That was just one of the thought processes I went down on but if someone knows the answer I would deeply appreciate it if that person would be kind enough to share such information with one such as me.
All languages, perhaps except assembly language, include sonmething called a "runtime" or "compiler runtime". The one for C++, for example, contains a function that calls the constructors of static objects, then calls main(), then calls the destructors for whatever it constructed and finally exits. It does a little more too, I think, but that's the gist.
Most languages define the content of the runtime somewhere in the language specification, and the definitions generally include some low-level support and helpers. Sometimes it's more than a little, and not just low-level helpers. Anyway, if the language uses garbage collection, then the collector is defined to be part of the runtime.
An ahead-of-time compiler such as clang will generally link the runtime into the final program using one or more libraries or object files. That is to say, the final executable is produced by linking together the files you specify and the files the language specifies.