The cdf is basically the integral of the pdf.
In the donut shop example, the cdf is
$$ F(x) = \int_{-\infty}^{x} f(t) \, dt = \int_{-\infty}^{x} \frac{1}{4} e^{-\frac{t}{4}} \, dt. $$ This integral can be solved and F(x) can be calculated as $$ F(x) = 1 - e^{-\frac{x}{4}} $$