(While I begin by talking about RPGs, I am later going to generalize to all kinds of tabletop and video games - “sit-down games”.)
When I used to write lots of articles about RPGs for White Dwarf, Dragon, and other magazines three decades ago, I mostly wrote two kinds of things: game rules, and advice about how to play and especially how to referee Dungeons & Dragons successfully. I rarely wrote settings; and only occasionally in the magazines did I write adventures, which are a combination of rules and setting/story.
When I thought about this further I realized that this can be generalized to any role-playing game: the person who creates the game is taking on three writing/designing tasks to a greater or lesser extent, the rules for the game, advice about how to play the game, and the setting (which includes at least the story that comes from hiSTORY) for the game. Supplements to the game are almost always about setting/story, often with additional rules. World-settings often include advice about how to use the setting, about how to successfully incorporate it into a campaign or base a campaign on it.
TSR published several settings for AD&D such as Dark Sun, Spelljammer, Arabian Nights, and Forgotten Realms, after the original Greyhawk setting. Some of Greyhawk was included with the D&D/AD&D rules, because it was Gary Gygax’s original campaign, but for the most part the original rules assumed a more or less Tolkien-like fantasy setting without being specific.
A world-setting supplement may be almost entirely about the “world,” about things like the geography of the world, how magic works in the world, who or what rules the world, and the history of the world. If it’s the more narrow sense of setting, as in the context for a particular adventure, along with a story (more or less), then much of the “setting” is descriptions of locations and NPCs. In adventures there are also rules in the sense of how the various obstacles to success work, as in “if the character walks across the pit trap there is a four in six chance it will activate and he will fall in”. There may be additional monsters, magic items, and other explicit rules for play.
The world-setting is like the background of a novel, or a sort of bible, with the story being the history of the world. The adventure setting is much more like a short story or (sometimes) novella.
Of course, some “world-settings” aren’t for an entire world, but may be for a single city and its environs (as in the Freeport series) or for a particular country or region (Arabian Nights). They’re usually large enough to provide the basis for an entire campaign, and that’s why they’re usually called “world-settings”, for the player characters they are the entire world.
Video game RPGs, being based in software, usually tie world-setting and rules together inseparably. If there’s a new world-setting, it’s usually an entirely new game to buy.
Some TSR tabletop world-settings for first and second edition AD&D were later adapted, if only in a magazine (e.g. Spelljammer in Dungeon Magazine), for the Third Edition rules. Settings generally can be adapted to more than one ruleset. Tolkien’s Middle-earth has been adapted several times, and many other settings that originate in movies or novels are then adapted to several rule sets over the years (e.g. Star Wars).
So you can write an RPG supplement that is almost entirely a description of a new world setting that can be adapted to many different games, such as the Freeport series and a great many other “D20" works. Or you can write one that is specifically adapted to a particular game by including many rules for that game, for example the original Spelljammer setting for AD&D. Or you can write an RPG supplement that has a specific setting and lots of rules for that setting, for example a dungeon adventure.
The more rules you include the more there’s a need for playtesting, though I’m pretty sure that rules included with world-settings often get little or no playtesting. Someone who writes rules and doesn’t include advice such as examples of how to play is probably not doing an optimal job.
A Broader View
You can write a set of RPG rules that has virtually no setting attached, for example the free-to-download Fate rules. But that set of rules is probably going to include some advice about how to use it successfully. Think about it, any example of how to play, unless it’s very specifically about a particular rules, is a form of advice.
And of course you can write a supplement that is almost entirely advice about how to play RPGs successfully, either a specific RPG or RPGs in general such as Robin's Laws of Good Gamemastering.
Adventures can be largely about rules or largely about story. In the early days the adventures tended to be about rules, partly because they were written by people who were longtime wargamers. More recently, published adventures are much more often strongly story-based, partly because many of the writers are frustrated (or even successful) novelists rather than wargamers. Also there are so many adventures available that many people who buy adventures aren’t likely to actually run the game, but like to read them - and naturally it’s the story that attracts them more than the rules.
The easy-to-remember form of all this is that the person writing RPG material can be a game designer, a teacher, and a storyteller/historian, with the latter divided into “short stories” (the adventures) and long stories (the world settings).
Not Just RPGs
Once I arrived at this conclusion I realized that any tabletop or video game is a combination of these three things. There are always rules or we wouldn’t have a game. (Though some improvisational RPGs are pretty light on rules, these days.) There is often advice about how to play the game in the form of examples of play if nothing else, but also strategy hints. Completely abstract games have no setting or story, and there are many abstract tabletop games that are given a setting or story that actually has nothing to do with the game (this has been common in Eurogames). But thematic games generally include a (his)story and setting, and many of the AAA video games are very thematic.
Puzzles also can have these three elements, but frequently have only one. Most puzzles include little or no advice about how to “play” the puzzle. Tabletop puzzles rarely include a setting/story, whereas many video game puzzles, such as “adventure games,” are heavily connected to a story. But all puzzles have to include an objective, which is a form of “game rule.”
Some toys have these three elements but typically a toy has neither rules nor goals, and many toys have no story - the “player” makes up the story. So I can make paper boats - there are rules about how to make paper boats, but not what to do with them - and no particular story to follow: I make up my own. So if I decide to put the paper boats in a tub of water, set them afire with burning paper airplanes, and sing “Stars & Stripes Forever” as they sink, that’s not something that was inherently part of the toy. (My fifth grade teacher actually did this when she was a kid in days before TV - she was cool.) Or if I have a set of race cars there’s an obvious implication that they’re going to be in a race but I have to decide everything else. The striking thing about many modern commercial toys is that they almost always include a setting and often a story, so that the kids don’t have to figure out the main parts of usage themselves (with consequent deleterious effects on the development of imagination).
In video games of course much of what we’re talking about is incorporated into the software and not something that someone reads. The rules are enforced by the software so that the player must play according to the rules (barring glitches in the programming of course!). The advice comes in the form of the tutorials, and sometimes in all of the hints/quests/other pointers that advise the player what to do. But video games tend to be light on advice about how to play because the software forces the player to follow the rules.
The settings in a video game, whether short-term or long-term, are less often explicitly described than in published paper role-playing games. This is partly because a video game offers other ways to describe and especially show the setting, and also because video gamers generally don’t read about the setting even when their character finds a virtual “book” or scroll that describes some of the setting - they just don’t bother.