The hack plugins are just shared libraries that have access to some internal apis of radare. The most important one "radare_cmd" which accepts a command string and returns the string representing the output of the execution.
In this way it is possible to perform any action in the core just formatting command strings and parsing its output.
All language bindings (python, lua, ...) are implemented as hack plugins. See 'scripting' section for detailed information.