Hey re444 and welcome to the forums.
For a general distribution, if you know the PDF you can use things like Metropolis-Hastings for random number generation (pseudo-random) from that particular distribution. This is useful for a generic distribution that is completely non-standard.
For standard distributions, most software packages come with routines to do this for you. R is a very popular statistical package that is free and comes with a lot of packages. You can generate many random numbers from these distributions including exponential, gaussian, uniform, chi-square, poisson, binomial, and so on.
If you want to do something like say X/Y where X and Y are standard distributions then simply get a random number from both distributions and calculate the function (for example x = randomnumber1, y = randomnumber2, final random number = x/y).
That's the basic idea of doing the above. If you have a standard distribution, chances are there will be a function to generate it for you. If it's non-standard and you have the PDF, use something like Metropolis-Hastings.