Block height represents the number of blocks that were confirmed in the entire history of a particular blockchain network - from the genesis block (or block zero) until the most recent one. Unlike the genesis block, all other blocks contain a reference (hash) to the block that came immediately before it, and the block height is the number of each block in that sequence. So the block height of the genesis block is #0, and the block height of the first block mined is #1.
Since blockchains are made up of blocks, an analogy that is sometimes used to describe them is imagining blockchains as stacks of legos. There is no way to remove a lego from the middle of the stack without messing up the whole structure - it is not like Jenga where you can slip out a block without compromising the others.
Therefore, the block height can be calculated by the time since the blockchain has launched divided by the average block time of the chain. In other words, the block height consists of the number of blocks mined (or validated) since the creation of a particular blockchain network.
Theoretically, the average block time should be roughly the target block time, based on the level of mining difficulty. Mining difficulty for many blockchains adjusts based on the amount of aggregate hashrate that the network has so that the block period can stay roughly constant. In the case of Bitcoin, the block time is 10 minutes, on average. Otherwise, the expected block period may fluctuate in response to the amount of computational resources that miners devoted to that particular network.
Block height should not be compared directly between different blockchains, as their average block period and hash rates are different. However, a copy of a blockchain may be considered “out of sync” if the block height of the local copy differs from what the globally accepted block height is. Thus, block height is a useful stat to look at whether the copy of the given blockchain is up to date or not.