Randomness in Blockchain

How to ensure randomness in blockchain?