As stated in the documentation available at its website (https://gym.openai.com/), OpenAI Gym is a toolkit for developing and comparing reinforcement learning algorithms. The toolkit actually consists of a Python package that runs with both Python 2 and Python 3, and the website API, which is useful for uploading your own algorithm's performance results and comparing them with others (an aspect of the toolkit that we won't be exploring, actually).
The toolkit embodies the principles of reinforcement learning, where you have an environment and an agent: the agent can perform actions or inaction in the environment, and the environment will reply with a new state (representing the situation in the environment) and a reward, which is a score telling the agent if it is doing well or not. The Gym toolkit provides everything with the environment, therefore...