How was the gravity free scene in the hotel in Inception shot? Was zero gravity created?
Now first of all, they definitely did not create zero gravity to films this, since this is way harder and more expensive then you might expect, and not really doable for a whole set at all. The only way to achieve that here on earth (well, not actually "on earth" either, but without putting the set in a geostationary orbit like satellites) would be through a parabolic flight in a plane, putting the passengers into extended free-fall (which is practically what weightlessness is). But you can only do that for a short time and not with a whole room, let alone an entire hotel corridor. And let's not talk about how much that would cost for the runtime of an entire scene.
But since Christopher Nolan is a known proponent of pracitcal effects minimizing the use of CGI (or at least not simulating entire sets with it), it has to be simulated somehow. The BluRay of the movie contains a few making-ofs that also elaborate on the simulation of gravity in the film, provided you're talking about the scenes in the hotel on the 2nd dream level.
What they did was use different sets for the whole scene, with different orientations, suspending the actors on wires to let them "fly" through the scene.
Christopher Nolan: What I wanted to do for the zero gravity sequences was to take an ordinary environment and achieve this very congruent zero gravity effect. We did it through a number of different rigs and in the final edit what you see is shot to shot to shot it tends to be a different orientation and a completely different rig in each shot and I think that more than anything else really stops the audience of seeing the trick of how this scene is done.
Some of the sets, especially the long hotel corridor was built upright, so that the walkway is actually vertical and the camera is at the bottom looking upward. Then they just hung the actors, primarily Joseph Gordon-Levitt, upside down on wires so his movement is actually controlled towards the bottom (along the corridor in the film) and he's free to move towards the sides (inside the cross-section of the corridor).
Paul Franklin: The vertical corridor is supposed to be the same location as the horizontal corridor, it's an identical set. The difference is that it has been built vertical standing on its end. This means we drop actors and stunt performers on wires down into the set and the camera looks up at them. They can then be raised and lowered and swing around the sides and it looks like they're floating in zero gravity.
In addition to that actor Joseph Gordon-Levitt tried to simulate the behaviour of a human in zero gravity, based on that of people subject to real weightlessness.
Joseph Gordon-Levitt: In real zero-G, and I've actually spoken to people that have been in real zero-G, what they told me is they never felt so relaxed in life. What I did is the exact opposite of that. In order to make it look like that was the case I actually had to keep every muscle tight because I was supporting myself.
For how they did the scene where the gravity is actually shifting from one side to the other, while the van on the first level is rolling over, you can take a look at MattD's answer.
For the hallway scene in Inception, they actually built a long corridor on a rotating set.
From Wikipedia regarding the set:
A hotel corridor was also constructed by Guy Hendrix Dyas, the production designer, Chris Corbould, the special effects supervisor, and Wally Pfister, the director of photography; it rotated a full 360 degrees to create the effect of alternate directions of gravity for scenes set during the second level of dreaming, where dream-sector physics become chaotic. The idea was inspired by a technique used in Stanley Kubrick's 2001: A Space Odyssey (1968). Nolan said, "I was interested in taking those ideas, techniques, and philosophies and applying them to an action scenario". The filmmakers originally planned to make the hallway only 40 ft (12 m) long, but as the action sequence became more elaborate, the hallway's length grew to 100 ft (30 m). The corridor was suspended along eight large concentric rings that were spaced equidistantly outside its walls and powered by two massive electric motors. Joseph Gordon-Levitt, who plays Arthur, spent several weeks learning to fight in a corridor that spun like "a giant hamster wheel". Nolan said of the device, "It was like some incredible torture device; we thrashed Joseph for weeks, but in the end we looked at the footage, and it looks unlike anything any of us has seen before. The rhythm of it is unique, and when you watch it, even if you know how it was done, it confuses your perceptions. It's unsettling in a wonderful way". Gordon-Levitt remembered, "it was six-day weeks of just, like, coming home at night battered ... The light fixtures on the ceiling are coming around on the floor, and you have to choose the right time to cross through them, and if you don't, you're going to fall."