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: 
A set is just a collection of elements, therefore, you have a set, since you have a collection of real numbers.
It is because each interval is set and union of two sets is set.