> Every 2,016 blocks (approximately 14 days given roughly 10 minutes per block), nodes deterministically adjust the difficulty target based on the recent rate of block generation, with the aim of keeping the average time between new blocks at ten minutes.
So the changes are made at somewhat predictable paces, in this case roughly every 14 minutes, but the difficulty is adjusted based on demand. In other words, it's a little of both. Demand though will definitely affect the difficulty of the problems, but the demand is only updated every 2,016 blocks.