OpenAI Gym is a toolkit of environments for building RL algorithms. In the context of RL, an environment refers to the actual task (a Markov decision process or MDP) that is to be solved by the algorithm. The state and action spaces of the task are defined by the environment.
The following diagram shows the basic structure of a Gym environment:
The agent that you build will take actions against the ...