This might be tough; erlang has a mechanism called 'ports' which let Erlang communicate with non-erlang languages, and as well, you can also write linked-in drivers for the erlang runtime which will essentially give you a foreign function interface, but beyond that I do not think it's possible to link the erlang virtual machine itself into something like a library/shared object. Here are some resources that might provide some information in that area, though:
http://www.erlang.org/doc/
http://www.trapexit.org/
Specifically you will want to look at the 'interoperability tutorial' on the erlang.org documentation pages.
Do not be disheartened, I am extremely weak at things like math (when I go to uni. for the first time in a month or so I'll only be doing algebra)! I tried as I could to make the above post approachable to those who do not have first hand experience with a language like haskell, and if you have questions I would be happy to answer and can likely explain it to you in easier terms. :]Well I do know reading Mad_guy's post makes me feel dumb.