Dear student,
When a ball is thrown upwards, the velocity at the maximum height becomes zero, i.e. the ball comes to rest but it experiences an acceleration due to gravity in downward direction.
A pen kept on a table experiences acceleration due to gravity but is at rest.
Regards.