A random variable is a function from the sample space to the real numbers. It assigns a numerical value to each outcome of an experiment, turning raw outcomes into something we can sum, average, and analyze.
A concrete example: flip three coins. The sample space has equally likely strings (HHH, HHT, HTH, …). Define to be the number of heads. Then takes values in with probabilities
Probability theory is much easier to do on numbers than on raw outcomes. Random variables let us compute expectations, variances, correlations, and apply the full machinery of calculus and linear algebra to uncertain quantities. In quant finance, the daily return of a stock, the number of trades in a session, and the loss of a portfolio are all random variables.