The main force acting on the ball all the time is the gravitational force (force of gravity) of the Earth. It always acts vertically downwards, towards the Earth. Air also exerts a small force of friction on the moving ball, opposite to its direction of motion.
(i) During its upward motion: The gravitational force acts downwards. The friction due to air also acts downwards, opposite to the upward motion. Both forces slow the ball down until it stops.
(ii) During its downward motion: The gravitational force acts downwards, in the direction of motion, so the speed of the ball goes on increasing. The small friction due to air now acts upwards, opposite to the downward motion.
(iii) At its topmost position: The ball is momentarily at rest, so there is no friction due to air. Only the gravitational force acts on it, vertically downwards. This is why the ball does not stay at the top but starts falling back.