Why does a polytime hitting set generator derandomize RP?
The point is that instead of checking what happens for all possible random strings, you can reduce the search to the output of the generator.
Let $M(x,r)$ be some RP machine for a language $L$, i.e. if $x\in L$ at least two thirds of the $r$'s lead to acceptance, and if $x\notin L$ there is no $r$ for which $M(x,r)$ accepts. Now, Given input $x$, construct a circuit $C_x(r)=M(x,r)$ and execute the generator $G\left(p(|x|),|C_x|\right)$, where $p(n)$ is the number of random bits used by $M$ on a length $n$ input. This yields a set $R$ of polynomially many strings, now simply check whether or not $C_x(r)$ accepts at least one element from $R$. This doesn't straightforwardly generalizes to BPP since in that case it might be the case that $x\notin L$ but $C_x(r)$ accepts some strings from $R$.