the maximum of two random variable The maximum of two random varibles $X$ and $Y$ is:
$$Z=\max\{X,Y\}=
\begin{cases}
X & \text{if } X \geq Y \\
Y & \text{if } Y \geq X
\end{cases}$$
I don't understand. So if I roll two dice, and let the first dice to be $X=\{1,\dots,6\}$ and second to be $Y=\{1,\dots,6\}$, and let $Z$ to be the maximum of the two. How do I define $Z$ then?

You can describe Z via its Cumulative Distribution Function (CDF):
$$P(Z\leq z) = P(\max(X,Y)\leq z) = P(X\leq z\text{ and }Y\leq z)$$
If $X$ and $Y$ are independent, $P(Z\leq z)=P(X\leq z\text{ and }Y\leq z)=P(X\leq z)P(Y\leq z)$.
You can think of it as having a machine which realizes both X and Y and then compares the realizations and outputs the bigger one. 
As for the specific case with two independent dice on $\{1,2,3,4,5,6\}$, $X$, $Y$, we have 
$P(Y\leq y)=\left\{ \begin{array}{lr} 1,& y\geq6 \\ \lfloor y \rfloor /6, &y\geq 0 \\ 0, y\leq 0 \end{array} \right.$ and identically for $P(X\leq x)$. 
Plug this into the formula given prior to get the CDF of $Z$.
