In a random effects or mixed effects model, a random effect is used when you want to treat the effect that you observed as if it were drawn from some probability distribution of effects.
One of the best examples I can give is when modeling clinical trial data from a multicentered clinical trial. A site (or center) effect is often modeled as a random effect. This is done because the 20 or so sites that were actually used in the trial were drawn from a much larger group of potential sites. In practice, the selection may not have been at random, but it still may be useful to treat it as if it were.
While the site effect could have been modeled as a fixed effect, it would be hard to generalize results to a larger population if we didn't take into account the fact that the effect for a different selected set of 20 sites would be different. Treating it as a random effect allows for us to account for it that way.