"random ZZ" wraps around the GMP function "mpz_urandomm" (see
https://gmplib.org/manual/Integer-Random-Numbers). By default, it samples from the discrete uniform distribution on {0, 1, ... , 9}, but you can change this using the "Height" option, i.e., "random(ZZ, Height => n)" would give you a sample from the discrete uniform distribution on {0, 1, ... , n - 1}, or, equivalently, you can use "random n". "random(a, b)" samples from the discrete uniform distribution on {a, ..., b}.
"random RR" wraps around the MPFR function "mpfr_urandomb" (see
https://www.mpfr.org/mpfr-current/mpfr.html) and samples from the continuous uniform distribution on the unit interval [0, 1]. You can also use "random b" or "random(a, b)" to change the support to [0, b] or [a, b], respectively.
"random QQ" samples the numerator and denominator independently from the discrete uniform distribution on {1, ... , 10}. The upper bound of the support can be changed using the "Height" option.
If you're interested in other probability distributions, check out the "Probability" package that was introduced in Macaulay 1.20.