We can see that each environment in the Gym is different. Every game environment under the Atari category is also different from the others. For example, in the case of the VideoPinball-v0 environment, the goal is to keep bouncing a ball with two paddles to collect points based on where the ball hits, and to make sure that the ball never falls below the paddles, whereas in the case of Alien-v0, which is another Atari game environment, the goal is to move through a maze (the rooms in a ship) collecting dots, which are equivalent to destroying the eggs of the alien. Aliens can be killed by collecting a pulsar dot and the reward/score increases when that happens. Do you see the variations in the games/environments? How do we know what types of actions are valid in a game?
In the VideoPinball environment, naturally, the actions are to move the paddles up or down...