Projectile motion goes on the concept that since diagonal motion (motion in 2D) is complicated, we simplify our study by looking at it in two directions: upward-downward ( y axis) and left-right (x axis).
In the y direction, theres a constant acceleration (acceleration due to gravity) g = -10m/s², minus meaning it faces downwards. So the equations of motion for accelerated motion help us do calculations for y direction. In the x direction, there is no acceleration. Thus it goes by the extremely simple formula distance = speed/time.
GROUND TO GROUND projectile:
Now lets look at the concerned equations and how we get them. Say, time of flight; i.e. how long the projectile is in air. We know that at the end of the projectile motion the y cooredinate will once again be 0 (when it reaches ground). But we started from the ground, i.e. y = 0. Hence, there has been no real displacement in the y direction. From the second equation of motion: s = ut + 1/2(at²), where s is displacement, we can put the values of s as 0, initial velocity (u) as whatever the initial velocity IN THE Y DIRECTION was, the acceleration (a) as -g, and solve for time (t). This yields t = 2u/g. Similarly, say you want maximum height. At the maximum height, the projectile at that instant is neither moving upwards nor downards. Thus by the third equation of motion (s = v² - u² / 2a) we can put values of v (final velocity) as 0, intial velocity IN THE Y DIRECTION be u, say, and acceleration (a) is -g. This gives us maximum height as u²/2g.
This was just an example. Things get complicated when we do projectiles on inclined planes, where the standard approach is to shift your point of view to the frame of the inclined plane, and assume downwars acceleration g to have split into x and y components (in the frame of the inclined plane)