What does it mean passed by value and not reference?

It means that the function gets the value of  trainer.state.epoch.

Therefore every epoch the value of trainer.state.epoch changes?

yes, it is updated internally by Engine during the run.