On linux (for example), we can directly make system calls using the api provided by OS (open/close/read/write) or we can use functions provided by libc (fopen etc) in C.
In other languages this is usually (always?) achieved with a wrapper around the native function calls. In reality, it looks something like this. LanguageX -> Wrapper -> Native Code(C/C++)
Sometimes this wrapper takes the form of an entire framework, such as in JNI for java. which also works great for Groovy scripts.
With some languages you can load native DLLs directly into your application in a way similar to C/C++. This is true in the the case of Python using ctypes.
Other times, native calls aren't needed at all and the same result can be produced directly using your language of choice. Cross-platform GUI toolkits are one small example where native OS calls can be replaced completely. Such as with GTK or QT
Hope that clears things up a bit :) Let me know if you'd like any other language-specific details.