Do the leading zeros in the desired hash pattern for mining change? If I understood it well, miners collect transactions in temporary files on which they apply a cryptographic function. The result will be reviewed against a desired pattern.

Does this "desired pattern" always have the same leading zeros? Or does that change now and then?
If it changes now and then, what triggers this?
Q: does this "desired pattern" always have the same leading zeros?


No.


  Or does that change now and then?


It changes every ~14 days (2016 blocks). The change depends on the hashing power of the bitcoin network at that moment. The new required hash needs to have that many leading zeros so that it takes ~10 minutes to find that hash.


  Q: If it changes now and then, what triggers this?


An algorithm triggers it. It's built into the bitcoin protocol. Every 2016 blocks the difficulty of finding a new block is recalculated.