Question: Does the union of intervals form a set? I mean the union of $(0,1)$ and $(1,2)$ is a set and if yes, then how?

Answer: 
As "explicit" sets these intervals are written:
$$(0,1)=\{x:0<x<1,\space x \in \mathbb{R}\}, (1,2)=\{x:1<x<2,\space x \in \mathbb{R}\}$$
So the union is:
$$(0,1) \cup (1,2)=\{x:0<x<2,\space x\neq 1,\space x \in \mathbb{R}\}$$
It is because each interval is set and union of two sets is set.