VC dimension of half spaces over the real line
First you need to understand how to calculate the VC-dimension. There are two conditions for the VC-dimension to be $n$ (here $n=1$):


You need to find one set of $n$ points that can be shattered (i.e. classify all possible $|\{0,1\}|^n=2^n$ labelings correctly) and
It must be impossible to find any set of $n+1$ points that can be shattered.


Now to your questions:

1) $a$ defines the family of possible decision functions in your classification problem. In your case, $a$ defines all possible half spaces along the real axis. That means all points greater than $a$ a classified as $1$ and all points less than $a$ are classified as $0$. 

First they show that one point can be shattered. And they choose that point to be $x=0$. They could choose another point but it is enough to show it for $x=0$.

To shatter $x=0$ you need to find an $a$ so that $h(0)=0$ and an $a$ such that $h(0)=1$. (Those are the $2^1=2$ possible labels.)

If the label is $0$ you can choose any $a&gt;0$ to label $x$ correctly. $2$ is one example. With $a=2$ all $h(x)$ will return $0$ for all points less than $2$ (which includes $x=0$). 

If the label is $1$ you can similarly choose any $a&lt;0$. $-2$ is one example, but you could also choose $-0.01$ or $-1232132158932$. In the case $a=-2$, $h(x)$ will return 1 for all $x&gt;-2$ (which again includes $x=0$).

So you fulfilled the first condition.

2) Now they show the second condition. But maybe they left out some of the details. Let me try to fill them in.

To show the second condition, you need to pick any two points and show that it is impossible to find $a$ to classify all possible labels correctly. Let's call the two points $x1$ and $x2$. The $2^2=4$ possible labels are: $\{0,0\},\{0,1\},\{1,0\},\{1,1\}$. 

Clearly, if $x1=x2$ it follows that $h(x1)=h(x2)$ and therefore the labels must be the same and and only $\{0,0\}$ and $\{1,1\}$ are possible but not $\{0,1\},\{1,0\}$.

Therefore, we can move on to the case where $x1 \neq x2$. Since the naming of $x1$ and $x2$ is arbitrary we can assume that $x1 &lt; x2$ ("without loss of generality" because if $x1 &gt; x2$ we can just rename $x2$ as $x1$ and $x1$ as $x2$ and we would have $x1 &lt;x2$ again).

Now, in this case it is also impossible to achieve all four possible labeling combinations. In particular they show that the labeling $\{1,0\}$ is impossible. 
If the label of $x1$ is $1$ then it follows (similarly to 1) with $x=0$) that $a$ must be less than $x1$. But then $a &lt; x1 &lt; x2$ and therefore $h(x2)$ must also be $1$ and can't be $0$.

(You could now move on to the case $x1 &gt; x2$ but as I tried to explain above that's basically the same idea, but now with the labeling $\{0,1\}$).

See this question for a very similar example with intervals instead of half lines.