Any accelerating object feels a force working against it that varies depending on the rate of acceleration, known as g-force. Gx is the force felt during linear acceleration, such as a takeoff; gy, a force felt from shoulder to shoulder, occurs during a barrel roll; and gz is an upward or downward force felt when pulling out of a dive or into a loop. Gravity exerts a continual downward g-force that decreases in strength at great distances.
A spaceship pilot experiences powerful g-forces during launch. The NASA space shuttle is designed to limit the force of liftoff acceleration to 3 g's -- any greater, and the pilot is unable to lift his hands to reach the controls. Early spacemen experienced forces up to 6 g's, a rate at which many people experience loss of vision or even consciousness. Space travelers and fighter pilots wear specialized suits that help counteract the negative impact of high g-forces on the human body.
Even in space, acceleration results in g-forces, but most spacecraft maintain a steady speed once they leave the Earth's atmosphere. Even Earth's steady g-forces still act on objects in space, however. There is no zero-g environment. The Pioneer probes launched in 1970 still feel a millionth of a g from the solar system far behind them. Objects in orbit are still under the effect of 0.95 g's from the Earth, but the speed of the orbit in which they are engaged gives the appearance of weightlessness.
Spaceships and astronauts orbiting the Earth are actually in continual free-fall. The gravitational pull of the planet curves their fall, causing them to move in an ellipse around it. This force affects the ship and the people inside of it equally, which means that the astronaut appears to have no gravity relative to the shuttle. This is what gives the false appearance of zero-g's.