Thousands of computers keep copies of the chain, so how do they agree on which new block is next? That process is called consensus, and it must work even when some participants are dishonest.