The story behind FEZ is a complex one. Here is what we know so far:
Before time was recorded, there were the Owls, who created the pyramid as seen in the "End Level" of the game, which is the home planet of the "Visitors" or "Aliens" that visited the Zu on their home planet.The Zu had established a way of life similar to earth. This plane, not yet named, had other creatures, which the Zu hunted, cooked and ate. The Zu have abandoned all but one settlement, leaving the others in ruins. It is unknown what happened to the Zu that caused them to abandon their other settlements.
It is said on one fateful day, the Zu encountered the Visitors, an unknown alien race. The king of the Visitors gave them the ability to see their world in 3D. With this power there became a monarchy within the Zu where only the king and his trusted advisers could see in the 3rd dimension. The king wore a crown, while his advisers wore a fez. What little is known about the Villagers and Gomez is that they are the descendant of the Zu, most likely a forgotten colony of the Zu who have advanced in technology and language. Even though they are ancient, the Zu have advanced further than the Villagers, in one case, the atmosphere and architecture similar to that of a 1920's city. The Zu speak in their own language consisting of the Zu Alphabet, Which reads Top-Bottom, Right-Left. The most that is known about the Zu and the Hexahedron is that the Zu's ruins contain methods of reclaiming the lost Cubes and cube shards. The remaining Zu in their sky village still speaks their native language, which must be deciphered in order to read it, what is known about the surviving Zu is that they are rebuilding the Portal to the other realms/worlds, and they have no idea what has become of their brethren.
The Villagers are descendants of The Zu, who have learned to speak English and have established a more modern way of life. Not much is known about these people, only that the player, Gomez, is one of them, and that Geezer was the previous adviser or Fez wearer.