I saw this website: [AppJS](http://appjs.com/) , and if you go to the end of it, you'll see the Section "We need your help!". Therein is explained that you could help by making wrappers for a specific platform (whichever you want, be it Windows, Linux, Mac...) that should be an interface for the JavaScript language so that the JavaScript can call those functions (and obviously to create cross-platform apps).
So my question is how can I write something in C++, compile it, and then call that function from outside, specifically from JavaScript?

What should I know? Does the AppJS or the NodeJS have some kind of module programmed that allows the communication between your own compiled C++ code and the JS part?

Basically how does this wrapping work?

Edit:

Probably, in the next couple of links there is information about the topic. 

<http://pravinchavan.wordpress.com/2013/11/08/c-binding-with-node-js/>
<http://es.slideshare.net/nsm.nikhil/writing-native-bindings-to-nodejs-in-c>

Rather than "wrapping" the word that would fit the most would be "**binding**" I guess. 
Pthread (POSIX) is a "wrapper" but not a "binding".