It's up to the JavaScript engine vendor to choose which random number generator they want to use.
As long as it produces a "random" number in the interval [0, 1>
they will fit the ECMA specification:
15.8.2.14 random()
Returns a Number value with positive sign, greater than or equal to 0
but less than 1, chosen randomly or pseudo randomly with approximately
uniform distribution over that range, using an
implementation-dependent algorithm or strategy.
Source:
http://www.ecma-international.org/ecma-262/5.1/#sec-15.8.2.14
The vendors doesn't list what algorithm they use (as far as I could see) so unless you want to browse through the source code (where possible) you can't find out (easily anyways).
(If you are asking in relation to security: don't use the built-in one from either browsers as they are not suitable for this purpose.)