Random numbers are generated by utilizing algorithms or physical processes that produce unpredictable and unbiased numerical values within a specified range or probability distribution.