In many cases we use sampling from a distribution. Also in programming languages they implement it.
But I wonder now what is the process of generating a sample from a probability distribution?
What happens behind the scene that given the parameters a model, a function returns a sample?
Also how can I know more on this topic? I want to understand it clearly.