I have been using JAGS but I am not quite sure how it actually simulates it values. I need to know in a general sense what's going on in the background.
There are several tools used by JAGS and/or BUGS.
Where conjugate distributions are used, straight Gibbs sampling is done. When that's not the case, adaptive rejection, slice sampling, or Metropolis-Hastings might be used (this is the case with BUGS at least; I believe it would be the case for JAGS as well).
You can examine the source code yourself and see exactly what it's doing in various circumstances. Also check out the discussion and the wiki.
Martyn Plummer's jags blog also has useful information: http://martynplummer.wordpress.com/
According to the JAGS documentation,
A report on the samplers chosen by the model, and the stochastic nodes they act on, can be generated using the “SAMPLERS TO” command.
It seems that the user can't control the choice of sampler, which is automatically chosen by JAGS, as described in the manual. I'd say that typically, it will choose a slice sampler. Again, to quote the documentation,
Slice sampling [Neal, 2003] is the “work horse” sampling method in JAGS.