The Three Rules
There are three rules:
The Rule of the World
A good game exists in a consistant World. Therefore, the mythos of the World is the ultimate rule.
In a well designed world, there are consequences for all actions. Consider a ruined castle on a hill near a city with an active thieves guild. Within the castle on can see treasure just lying on the ground. In many campaigns, this would be a chance for the Player Characters (PCs) to get some easy loot. In consistant world, there would be a reason why the treasure is untouched. Visiting the ruins is probably going to be a fatal mistake.
The Rule of the Story
The purpose of an RPG is the participation in the telling of the Story. Within the shape of the World, the needs of the Story win against all other considerations. The GM, as chief storyteller, gets to decide what is or is not part of the Story and how it fits into the World.
The Rule of Reason
Within the scope of the World and the Story, what is reasonable is allowed to happen; what is unreasonable does not happen.
From these three rules...
...the guides and lesser rules of the game are derived. There is, however, a fourth rule, of sorts. It is a two edged rule. I call it the...
Angry Villager Rule
In the old movies, when the evil villian annoyed the villagers enough, they would rise up and burn the castle. So, in a functional world, if the Player Characters (PCs) become too much of a problem in the world, the angry villiagers should rise up against them. Of course, if the GM becomes to arbitrary in the running of the campaign, the PCs will rise up and walk out.
Both the GM and the PCs should keep the Angry Villiager Rule in mind.