A random variable is a variable that can take on different values based on the outcome of a random event. There are two main types of random variables: categorical (discrete) random variables which can only take on specific values, and numerical (continuous) random variables which can take on an infinite number of values within a given range. Discrete random variables examples include the number of heads in a coin flip, while continuous random variables examples include the height of a person.