Think of a topology as a method of assigning the adjectives 'open', 'closed', or 'neither' to subsets of some space.
This must be done in a way that is compatible with the rules of 'being a topological space'. A set is open if and only if its complement is closed, and thus it is sufficient to state the rules only for one or other of open and closed.
(-infinty,0] is closed in the usual topology. It is not open in the usual topology. (Some sets in some topologies may be both open and closed.)
Open sets are unions of open intervals, in the usual topology on R. So (0,1)u(3,4) is open.
The rationals, as a subset of R, are neither open nor closed.