This isn't really exact, many details are missing, but in essence the block content (transaction data) + hash of the previous block + the nonce (big random number) are hashed and the block is regarded as valid if the hash, interpreted as a big number, is smaller (i.e. it has enough leading zeroes) than a certain value which is specified by the current difficulty level.
If the hash doesn't fit this description, another nonce is tried until a fitting hash is found.