On a number line, the solution of −1≤x<4 is a shaded stretch from −1 to 4, with a filled dot at −1 (included) and an open dot at 4 (excluded). Interval notation writes that picture in symbols: [−1,4). The square bracket stands for the filled dot and the round bracket for the open dot, with the smaller endpoint written first.
Rays that never stop use infinity. x≥3 is [3,∞), and x<0 is (−∞,0). The symbol ∞ is not a number, so no real number equals it, and it always gets a round bracket. The whole number line is (−∞,∞).
When the solution comes in two pieces, write each piece and join them with ∪, which means "or". The domain of f(x)=x−21 is every number except 2: (−∞,2)∪(2,∞). The solution of "x≤−1 or x>3" is (−∞,−1]∪(3,∞).
Interval notation describes continuous ranges only. The set {1,2,3} of three whole numbers is not [1,3], which also contains 1.5 and every other number in between. And outside an inequality, (2,5) usually means the point with x=2 and y=5; the context, a range of values or a location on a grid, tells you which.
Think of it like this. Read an interval like a stretch of road with a gate at each end. A square bracket is a gate you may stand in; a round bracket is a gate you can walk up to as closely as you like but never stand in. Infinity has no gate at all, because that road never ends, so that end always takes a round bracket.
Core idea. Interval notation names a range of real numbers with square brackets at endpoints that are included and parentheses at endpoints that are excluded.