I don't understand the definition of quantiles 
Let $x_1,x_1,\dots,x_n \in \mathbb{R} (n \in \mathbb{N})$ be some
  observations and let $x_{(1)}, x_{(2)},\dots,x_{(n)}$ be increasingly
  sorted observations. The $\alpha$-quantile for $\alpha \in (0,1)$
  is defined by
$$ q_\alpha = \begin{cases} x_{(\text{ceiling}(n\alpha))} & \text{if }
n\alpha \notin \mathbb{Z}  \\  [x_{(n\alpha)},
x_{(n\alpha+1)}] & \text{if } n\alpha \in \mathbb{Z}
\end{cases} $$

I understand that this definition is for the quantile, where $\alpha =0.2$ would mean $20$th percentile. However, I don't really understand $n\alpha$. Is that $n$ multiplied by $\alpha$, what would that even mean?
Update: Ok, I think I sort of get it. Suppose there were $50$ observations, then the $\alpha$ quantile can either be defined by an observation or an interval of observations, this depends on whether $n\alpha$ is an integer or not.
Suppose we say $\alpha = 0.2$, then $0.2\cdot50= 10$, an integer, so the $\alpha$ quantile is $[x_{10}, x_{11}]$.
Is this correct?
 A: I wanted to type a brief answer but in the process, I felt the need to elaborate... this text is about the quantiles of a sample, or, maybe about the empirical quantiles of a distribution. I don’t know about the whole text but this snippet is not so good — we need to forget it and start from scratch. I’ll start by the quantiles of a distribution.
Remember the cdf, the cumulative distribution function? It is defined by
$$F(x) = Pr(X \le x).$$
In many cases, e.g. if $X$ is normal, $F$ is a bijection from $\mathbb R$ to $(0,1)$. In this case, you can define the quantiles of the distribution by
$$q_\alpha = F^{-1}(\alpha),$$
that is, $q_\alpha$ is the unique number such that
$$ F(q_\alpha) = Pr( X \le q_\alpha ) = \alpha, $$
for all $\alpha \in(0,1)$. 
However, in many situations $F$ is not a bijection and we have to find something else. Let 
$$q_\alpha = \text{inf}\left\{ q : F(q) \ge \alpha \right\}. $$
To better understand this definition, I’ll split it in three subcases.


*

*if there is a unique number $q$ such that $Pr(X \le q) = \alpha$, then this is $q_\alpha$, as in our first case; 

*there may also be a whole interval of such $q$'s: in this case, $q_\alpha$ is the lower bound of this interval, $F(q_\alpha) = \alpha$ and no smaller number has this property; 

*there may be no such number $q$; in this case, consider the interval of numbers $q$ such that $\Pr(X \le q) \ge \alpha$; $q_\alpha$ is the lower bound of this interval, $F(q_\alpha)$ is $> \alpha$ and no smaller number has this property. 


So now turn to the quantiles of a sample. Assume you have 4 observations $x_{(1)} \le x_{(2)} \le x_{(3)} \le x_{(4)}$. 
You can consider a distribution in which these $4$ numbers have equal probability $0.25$. In this case, for $\alpha \le 0.25$, $q_\alpha = x_{(1)}$, for $0.25 < \alpha \le 0.50$, $q_\alpha = x_{(2)}$, and so on. This is the behavior of the $R$ function quantile when type = 1 (not the default!).
You can also prefer to consider that these numbers are sampled from an unknown distribution, and that your aim is to find a good estimations of its quantiles. In this case, many rules are possible, based on various kind of linear interpolations.
Now, back to your text. To me, it doesn’t make much sense to consider that the quantile $q_{0.25}$ of this sample of four numbers is the whole interval $[x_{(1)}, x_{(2)}]$. This might be a good manual to learn R, but I recommend that you use a statistics textbook too for proper definition of the concepts.
A: The definition that you quote uses order statistics notation, so $x_{(1)}$ is the first value of the ordered sample (i.e. the minimum), $x_{(n)}$ is the $n$-th value (i.e. the maximum), $x_{((n+1)/2)}$ is the median for odd $n$ etc. Using such notation you can define the $\alpha$-th quantile as $x_{(n\alpha)}$ when $n\alpha$ is an integer, e.g. if $n=100$, and $\alpha = 0.5$, then $n\alpha = 50$. Notice however that this differs from how would we understand the median, because for the median we would take the average of $x_{(n/2)}$ and $x_{((n+1)/2)}$. This is because the definition that you quote is not the formal one, but is rather one of the ways that we may translate the definition of distribution quantile to that of sample quantiles (see Hyndman and Fan, 1996). The definition of distribution quantile is
$$ Q(p) = F^{-1}(p) = \inf\{x : F(x) \ge p \} $$
so it is the smallest value of $x$ such that its probability is at least $p$ (in case of your definition, $\alpha$).

Hyndman, R.J., & Fan, Y. (1996). Sample Quantiles in Statistical Packages. American Statistician, 50 (4): 361–365.
