How does gravity affect projectile motion?
Gravity opposes the vertical component of velocity of the projectile with which it has been projected.
Now suppose a projectile is projected with an initial velocity
As gravity will affect the vertical component only.
So,vertical component of its velocity is
So, at the highest point of its motion,the projectile has no vertical component of velocity,only horizontal component of velocity exists.
After that the projectile starts coming down being accelerated by gravity.So it's height decreases and at a time it reaches the ground.
So where,the horizontal component of velocity pushes it forwards,vertical component of velocity pushes it upwards,but it comes back to the ground just because of the gravitational force.