The state of a substance at a given temperature depends on where that temperature sits compared with its melting point and boiling point. Below the melting point the substance is a solid. Between the melting point and the boiling point it is a liquid. Above the boiling point it is a gas. At exactly the melting point both solid and liquid are present, and at exactly the boiling point both liquid and gas are present.
Use data to check. Oxygen melts at -218 °C and boils at -183 °C. Room temperature, 25 °C, is above its boiling point, so oxygen is a gas. Bromine melts at -7 °C and boils at 59 °C. At 25 °C it is between these values, so bromine is a liquid. Sodium chloride melts at 801 °C and boils at 1413 °C, so it is a solid at 20 °C, a liquid at 1000 °C and a gas above 1413 °C.
State symbols show the state in an equation: (s) for solid, (l) for liquid, (g) for gas and (aq) for dissolved in water.