A common misconception beginning mathematicians have is that mathematical notation follows some universal and inviolate rules; perhaps this stems from the fact that mathematical arguments follow rigorous rules of inference.
Notation is all about human communication. It is "right" if your readers can easily understand what you are trying to say and "wrong" if it is incomplete, confusing, or misleading. Clashing with some common conventions is one way of being confusing, so it's good to familiarize yourself with the most common ways others write things, but keep in mind that different mathematicians and authors will use different notation and that there is no "one right way" to write mathematics.
With that in mind, I would say that you have identified two common ways to define sets: the first as an explicit enumeration of elements,
$$S = \{1, 2, 5\}.$$
You can write (small) intervals of natural numbers this way, but it is not so convenient to define intervals of real numbers like this, since you cannot list the uncountably infinite real numbers between the endpoints $a$ and $b$ of an interval. The above, though, is a special case of set-builder notation
$$S = \{x\in\mathbb{R}\ \mathrm{s.t.}\ \textrm{some condition on } x \};$$
using this notation you can write an open interval as
$$S = \{x\in\mathbb{R}\ \mathrm{s.t.}\ a < x < b\}.$$
Set-builder notation is extremely powerful and common, but notice that again there is no universal "right" notation; some authors will write ":" or "|" instead of "s.t", etc.
The second set of examples you list are common shortcuts for writing intervals, using $()$ for open endpoints and $[]$ for closed ones. Notice that some authors write $]a,b[$ for the open interval instead of $(a,b)$, but yours is probably the most common convention. In this notation $(-\infty, \infty)$ would indeed indicate the set of all real numbers, although you should be aware that this notation is not complete free of potential confusion: is this an interval of real numbers, rational numbers, integers, or something else? In context it might be obvious, but there is a potential ambiguity.
Like your books, I wouldn't try to write the set of real numbers using an interval at all: this is a bit circular, since intervals are subsets of the real numbers, and in any case it's quite safe to assume that your readers know what the real numbers are without being handed an explicit set. Actually defining the real numbers rigorously is a surprisingly subtle problem, and if you are interested one keyword for starting your research is "Dedekind cuts."
For saying that a variable comes from the real numbers, I would write "$x\in\mathbb{R}$" or "a real number $x$" instead of "$x\in (-\infty,\infty)$" in most situations.