For the examples that follow, suppose that you want to estimate the shelf life of a pill that you produce. You produce the pill on multiple production lines. Each production line is stable and produces consistent output.
If you want to estimate the shelf life of pills that are produced on all of your production lines, and you select your test batches from a subset of lines that you select randomly, then batch is a random factor.
For example, suppose that you have a total of 30 production lines. You want to estimate the shelf life of pills that are produced on all 30 lines, but you cannot test all of the lines. Instead, you randomly select a subset of 8 production lines and test one batch from each. In this case, batch is a random factor. The analysis uses the data collected from the 8 randomly selected lines to calculate a single shelf life estimate that applies to pills that are produced on any of the 30 production lines. The more lines you test, the more precise the estimate will be.