As a set it tells that x can be anything but -2 and 8. For -2, we write our interval so that it includes everything but 2.
(-∞, -2) ∪ (-2,....)
We use the union because it could be in one interval or the other, and we use parentheses to exclude -2. Now we repeat it with 8.
(-..., 8) ∪ (8, ∞).
Lastly we put both together.
The set in interval notation is (-∞, -2) ∪ (-2, 8) ∪ (8,∞)