Given the cumulative distribution function find a random variable that has this distribution. We are given a Cumulative distribution function $(CDF)$ how do we find a random variable that has the given distribution? Since there could be a lot of such variables we are to find anyone given that the function is differentiable and increasing.

I read somewhere that we could simply take inverse of the function(if it exists) and that would be the Random variable you are looking for, but I don't understand it, even if it's true(?).

If that's true, why? Else, how do we find a random variable for the distribution?
If you are studying elementary probability theory, allow me to reformulate your question as "how can I represent a random variable $X$ with a given CDF $F_X$ in terms of a uniform random variable $U$ on $(0,1)$?" The answer to that is the quantile function: you define 

$$G_X(p)=\inf \{ x : F_X(x) \geq p \}$$
and then define $X$ to be $G_X(U)$. 

Note that if $F_X$ is invertible then $G_X=F_X^{-1}$, otherwise this is "the right generalization". One can see this by looking at the discrete case: if $P(X=x)=p$ then $P(G_X(U)=x)=p$. This is because a jump of height $p$ in $F_X$ corresponds to a flat region of length $p$ in $G_X$, and the uniform distribution on $(0,1)$ assigns each interval a probability equal to its length.

The natural question is now "what's a uniform random variable on $(0,1)$?" Well, it has $F_U(x)=\begin{cases} 0 &amp; x&lt;0 \\ x &amp; x \in [0,1] \\ 1 &amp; x&gt;1 \end{cases}$. But otherwise such a thing is a black box from the elementary point of view. 

If you are studying measure-theoretic probability theory then the answer is a bit more explicit. A random variable with CDF $F_X$ is given by $G_X : \Omega \to \mathbb{R}$ where $G_X$ is the quantile function as defined before, $\Omega=(0,1)$, $\mathcal{F}$ is the Borel $\sigma$-algebra on $(0,1)$, and $\mathbb{P}$ is the Lebesgue measure. Note that on this space the identity function is a uniform random variable on $(0,1)$, so this is really the same construction as the one described above.

In any case these constructions can be generalized to finitely many random variables by looking at the uniform distribution on $(0,1)^n$ instead of $(0,1)$.
The $\text{cdf}$ of a random variable tells the probability that its value falls below a given bound,

$$\text{cdf}_X(x)=\mathbb P(X&lt;x).$$

For a uniform variable $U$, we have

$$\text{cdf}_U(x)=\mathbb P(U&lt;x)=x$$ for $x\in[0,1]$.

Now if you want to create a random variable with an imposed $\text{cdf}$, let $h(x)$, you want to achieve

$$\mathbb P(X&lt;x)=h(x).$$

If $X$ derives from a uniform variable via some transformation, let $X=g(U)$, you have

$$\mathbb P(X&lt;x)=\mathbb P(g(U)&lt;x)=h(x).$$

But also, assuming $g$ invertible, and using the fact that $U$ is uniform,

$$\mathbb P(g(U)&lt;x)=\mathbb P(U&lt;g^{-1}(x))=g^{-1}(x).$$

Putting these facts together,

$$g^{-1}(x)=h(x)$$ or $$g(x)=h^{-1}(x).$$



For a simple example, take a negative exponential distribution,

$$\text{cdf}_X=h(x)=1-e^{-x}.$$

Then by inversion,

$$g(x)=-\ln(1-x)$$ which maps $0$ to $0$ and $1$ to $\infty$. By looking at the plot of $g$, you will understand that the "density" of the transformed points goes decreasing, because the slope increases, resulting in a bias in favor of the small values.





We can even play the exercise when $U$ is not uniform but has a known $\text{cdf}$, let $f(x)$. Then it suffices to adapt the equations, and

$$\mathbb P(X&lt;x)=\mathbb P(g(U)&lt;x)=h(x)=\mathbb P(g(U)&lt;x)=\mathbb P(U&lt;g^{-1}(x))=f(g^{-1})(x)$$ and we need 

$$g(x)=h^{-1}(f(x)).$$