the sight is mounted on top so what the sight is pointing at isn't what the barrel is pointing at to begin with... and as you're pointing out, mavity has an effect on the bullet too causing it to fall
the sights can be adjusted for different ranges... so usually you'd 'zero' the sights at 100 meters... this is done by firing 5 rounds at a target and seeing where the group of holes appear... you then adjust the sights up/down, left/right etc.. and fire another 5 rounds at the target... this time hopefully your 5 rounds land in the centre of the target... the 'gun' or rifle is then zeroed
once your rifle is zeroed at say 100 meters then firing at targets at 200 meters is just a case of turning a dial to '200', for ranges in between you can adjust slightly with your eye, you also may have to adjust for wind
the bullet actually travels in a slight arc, travels up a bit when exiting the barrel and then falls slightly before impacting the target....
Using the old SUSAT sight in the army there is also the emergency battle sight on top - this is fixed at 300 meters as it gives the best chance of hitting targets at various distances