For example, in this article: https://www.learndatasci.com/tutorials/reinforcement-q-learning-scratch-python-openai-gym/, which explains Q-learnig, teaches the Smartcab problem, the environment is a 5x5 grid. In this example, states are positions where the agent is.
In Q-learning, states need to be just X and Y positions to the agent moviments as in the grid like in the Smartcab example, or instead, depending on the problem a state can be several other characteristics such as speed, temperature, pression, quantity, and others type of characteristics ?