computers can be coded to pick a "random" number between set boundaries e.g a number between 1 and 100.
A computer on its own, is never random. NEVER!
If you picked those numbers a billion times, certain numbers would come out more than others and the nature of the 'random' algorithm would come unravveled.
The most common randomisation technique uses human input.
Such as mouse movements, which provide the numbers going into the algorithm (the seed).
A random seed can produce a random result.
Other ways in electronics to produce randomness is using noise.
Noise is a product of many things, including radio waves emmitted from the big bang. So its quite reliably random.
Noise produced by some semiconductors is random on a quantum level.
So with a random seed a computer can be random.