Gravity is strongest at the surface of the Earth, where an object is directly affected by the planet's mass. As you move away from the Earth's surface—whether it's upward into the atmosphere or downward into a body of water—the gravitational force experienced by the object decreases slightly, though it remains strong even at lower altitudes.
Thus, in the context of your seaside community diagram, gravity would be strongest on the object when it is at the surface of the Earth (for example, standing on the beach or the ground). If the object is elevated (like on a hill or in a building) or submerged deeply underwater, the gravitational pull on it would still be strong but would be marginally less than at ground level.