Direct answer
A projectile's flight path is determined mainly by its release velocity, release angle, release height, gravity, and aerodynamic forces. In real sporting situations, air resistance, wind, the projectile's shape and surface, and spin also affect its trajectory.
The mechanism
Release velocity has horizontal and vertical components:
