In each block header there are 5 fields: version, previous block header hash, merkle root hash, block time, target, nonce. From these fields the previous hash and target are fixed while the rest are variables with version and time having some limits. As I said the miner finds a combination of these that has the desired hash. For example by changing the transactions in the block or their orders the miner can change the merkle root hash hence change the header hash.
The target (https://bitcoin.stackexchange.com/questions/57184/what-does-the-nbits-value-represent) is not 'fixed' as in constant however it is 'fixed' as in to a specific equation that is based on the block height.
See: https://bitcoin.stackexchange.com/questions/5838/how-is-difficulty-calculated