When a body is placed in the gravitational field of a planet or another body the force acting on the body is called the weight of the body. The acceleration due to the gravity of earth is denoted by 'g'. As one moves away from earth, this acceleration reduces inversely with the square of distance from the centre of earth.
When a person is going round in a roller coaster, he may experience an acceleration of '2g', which is twice the value of acceleration on the surface of the earth. Similarly, an astronaught going in a rocket might experience '12g. The accelerations less than 1g are normally referred as microgravity. The acceleration experienced by an astronaught in a spaceship will be 10,000 times smaller than 1g (10-4g).
When a body of mass 'm' is placed at a distance of 'r' from the centre of the earth, the force acting on the body is given by the product of its mass and acceleration due to gravity.
F = m.g = weight of the body.
When the same body is placed on the surface of the earth, the force of attraction between the two is given by,
F = G.M.m / R2. Where 'R' is the radius of earth.
This must be same as the force on the body of mass 'm' with acceleration of 'g'
m.g = G.M.m /R2
From which we write,
g = G.M/ R2 --------------(8.28)
Here 'g' is the acceleration of the body of mass 'm' due to earth's gravity, when it is at a distance equal to the radius of the earth. The value of 'g' varies inversely with square of the distance from the centre of the earth since the mass and radius of the earth are constant. If the body is in the gravitational field of another planet, the value of 'g' will be different and depends on the planet's mass and radius. From the above relation, it can be observed that the value of g will be high for planet or body with large mass and small radius. In other words, the acceleration due to gravity depends on the density of the planet.
Variation of acceleration due to gravity of earth:
The acceleration produced in a body by the gravitational force of attraction due to earth does not depend on the mass of the body. The acceleration due to gravity on the surface of the earth was found to have an average value of 9.8 m.s-2.
Acceleration of a body, however, varies in magnitude both with the height of the body above the surface of the earth as well as the depth in the interior of the earth.
Variation of 'g' with height:
The gravitational force on a body of mass 'm' when it is at a height 'h' above the surface of the earth is given by,
Fh = G.M. m / ( R + h)2. = G.M / ( R+h)2.m = gh.m ---- (1)
When the same body is on the surface of earth, the force of gravity is given by,
F = G.M.m / R2 = (GM/R2) . m = g.m ---- (2)
Dividing (1) by (2), we get,
gh / g = R2 / (R+h)2.
Or gh = g ( R / (R+h) )2.
This can be written as, by multiplying the numerator and denominator by R2.
g h = g [ R2 / ( R2 ( 1 + h /R)2 )]
g h = g ( 1 + h /R) -2.
If the height 'h' is small compared to radius of earth R, the term h2 can be neglected and the above equation will be reduced to,
g h = g ( 1- 2h /R) -------------------- (3)
Variation of 'g' with depth:
When a body is at a depth 'd' below the surface of the earth, its distance from the centre of the earth will be (R-d).

The body at a depth, d, will experience a force of attraction due to the mass of the earth of radius (R-d). The net force of attraction due to the mass of the earth in the shell of thickness 'd' is zero, when you do vectorial addition. Therefore, the gravitational force on the body at a depth 'd' below the surface of earth will be,
Fd = G.M'.m / ( R-d)2. = [G.M' / (R-d)2 ]. M ------- (4)
Where M' is the mass of the earth of radius (R-d).
Let the average density of the earth be 'r' then the mass of earth 'M' with radius R will be,
M = 4/3. p.R3. r -------------- (5)
So, M' = 4/3. p. (R-d)3. r -------- (6)
Substituting (5) in (2) and (6) in (4) we get
F = (G. 4/3. p.R3).m . r / R2.
The acceleration due to gravity on the surface of the earth is given by,
g = F /m = G.4/3. p. R . r --------------- (7)
Similarly, the equation (5) becomes,
Fd = G. 4/3. p..(R-d)3. r. m / (R-d)2.
The acceleration due to gravity at a depth 'd' below the surface of the earth
gd = Fd / m = G.4/3. p. (R-d). . r. ----------- (8)
Dividing (7) by (6)
gd / g = (R-d) / R.
gd = g. ( 1 - d/R) ----------------- (8.29)
The variation of acceleration due to gravity with height 'h' above the surface of the earth and depth 'd' below the surface can be represented graphically as shown below.

Fig: Variation of g with height and depth from the surface.
Variation of g with latitude:
The acceleration due to gravity is not same at all places though its average value on the surface is taken as 9.8m.s-2. This is variation arises because of the rotation of earth about its axis. As the earth rotates from west to east with constant angular velocity w, there will be additional force acting on the body of mass 'm' . The magnitude of this force depends on the latitude, since the distance of the mass from the axis of rotation will be different at different latitudes.

Fig: Variation of g with latitude.
Let 'P' be a point at which the mass is kept. The line joining the point P to the centre of the earth O, makes an angle l with the horizontal as shown above. The gravitational force of attraction acts along the line PO whose magnitude is given by
F = m.g.
There is also the centrifugal force acting on the mass at P given by m. w2.PM where PM is the distance from P to the axis of rotation. This force tries to throw the mass out of the surface acting radially outward from the axis of rotation, along MP.
The distance PM = R.cos l.
The centripetal force of mass 'm' at P is given by,
FC = m. w2. R. cos l.
The gravitational force m.g acting along PO can be resolved into two components at P. One component will be the centripetal force, FC that opposes the centrifugal force, and the other component Fl. is given by,
Fl = m. gl
The net force F at P is given by vectorial addition of the two components.
F = FC + Fl
Applying the triangle law to the above forces we get,
(m.gl )2 = (m.g)2 + (m. w2. R.)2 - 2.mg. m. w2. R. cosl.
This can be written as
g l. = g [ 1 + ( R. w2 / g) - 2. R. w2. cosl / g ] 1/2.
Since the term ( R. w2 / g) is very small, it can be neglected.
Expanding using binomial theorem we get,
gl = g [ 1 - ( w2. R. cos2 l) / g ]
At the equator, the latitude l = 0 and the acceleration due to gravity will be least due to the centrifugal force.
Fequator = F - FC = mg - m. w2. R.
The acceleration due to gravity at the equator is reduced by
geq = ( g - w2.R)
At the poles l = 90 and cosl =0,
The acceleration due to gravity will be same as g.
At any latitude, the acceleration due to gravity is given by,
gl = g [ 1 - ( w2. R. cos2 l) / g ]----------(8.30)