Cube has been compared to the recent spate of virtual reality films, such as The Matrix, eXistenZ, and The Thirteenth Floor. However I don't think the comparison is merited. Cube is really about a character study of people trapped in an artificially constructed world, whereas the latter movies are primarily about the nature of the worlds the character inhabit (and not the characters themselves).
The Cube at first glance (from the inside) appears to be a bunch of interconnected cubic rooms with six openings, forming some sort of a maze. Some of the rooms are booby trapped to render death with quick succession. Five people suddenly find themselves thrust together in the Cube: Quentin, a police officer with ingrained prejudices and a lot of anger; Leaven (Nicole de Boer of Star Trek: Deep Space Nine and The Dead Zone TV series fame) a bit of a mathematical prodigy (even though she takes too long to figure out that a number ending in 5 cannot be prime); Worth (David Hewlett), an architect partially responsible for the design of the Cube; Holloway (Nicky Guadagni), a doctor; and Kazan (Andrew Miller), an autistic savant.
As the five strangers become acquainted with themselves and their surroundings, they are unable to figure out what the purpose of the Cube is, and who or what is responsible for its construction (with the assumption that there is indeed a purpose even though one of them posits that this could just be random event). The only visible purpose appears to be intimately tied to the plight of the five people (i.e., the Cube is defined by those trapped in it). Each must depend on the skills of the others in order to survive. For some, this is easier than others: Kazan has no choice but to trust those around him. For Quentin, this is incredibly difficult given his profession. Needless to say, given the claustrophobic nature of the rooms, the fact that they have no means of nutrition, and frustration at failed attempts to unearth the mystery of the Cube, there is a tremendous amount of interpersonal conflict.
Director Vincenzo Natali's skills are definitely laudable in that he takes the story of five people trapped in a room and makes it into an interesting and worthwhile movie to watch. The claustrophobic nature of the story is reminiscent of Jorge Luis Borges and Harlan Ellison (The Library of Babel and I Have No Mouth and I Must Scream respectively). The performances are solid. The bleak set design almost transcends the low-budget nature of this film. There is a very cool suspense sequence at the end, where the characters must traverse a cube in total silence.
The science fiction aspect of this film lies in the fact that each of the rooms is identified by a set of numbers, and the characters must utilise mathematics to understand the nature of the cube and to escape from it (with some interesting cryptographic implications given the relative difficulties of testing primality (which Leaven possesses the ability to do) and factoring). But this is only of marginal interest. As I say above, Cube is really a study of the human condition. As a result, we never know anything about the Cube itself. In the end, it is the people who are primarily responsible for each others' fates, and not the object they're trapped in.
The ultimate "moral", if you can call it that, is that in spite of his limited abilities, Kazan is the only person who gets out of the Cube (à la Pi and Forrest Gump). The contrast between a character like Kazan and the angry Quentin is stark: who is a better and a more content person?