I don't really understand what to do when asked to "simulate from this distribution", given a CDF.
I understand that I am being asked to describe the algorithm, or find a method, for simulating. I assume this involves the acceptance-rejection method or an alternative. But I do not understand the process on a theoretical level. Could anyone help me?
Simulating in this case means generate a sample that follows the distribution. Imagine the distribution $f_X(x)$ for which you want to generate a sample, you're given its CDF $F_X(x)$, then if $F_X^{-1}(u)$ is the inverse of $F_X(x)$ then
You can see the proof here. I'm just going to write an example. Imagine you are tasked with generating random numbers following an exponential distribution with parameter $\lambda$. The CDF is
$$ F_X(x) = 1 - e^{-\lambda x} \tag{1} $$
and its inverse is
$$ F_X^{-1}(u) = -\frac{1}{\lambda}\ln(1 - u) \tag{2} $$
All you need to now is to generate a bunch of uniformly distributed random numbers in $(0,1)$ and evaluate (2), the result is then exponential! In python this looks like
The red line is $f_X(x) = \lambda e^{-\lambda x}$