The random number is directly generated from a Hadamard gate using Qiskit Terra. It is similar to rolling an n-faced dice, where n is the number of qubits. It is the worst way to generate random numbers using a quantum computer but the sequence developed is truly random.
For a more detailed example of generating random variates from various distributions using Qiskit aqua, take a look at this tutorial.