How can an object's instantaneous speed be zero and it's instantaneous acceleration be nonzero?

Suppose you throw a ball upwards at some velocity $v$. When you catch it again it's traveling downwards at (ignoring air resistance) a velocity of $-v$. So somewhere in between throwing and catching the ball it must have been stationary for a moment i.e. it's instantaneous velocity was zero. Obviously this was at the top of its travel.

When you throw the ball it immediately starts being accelerated downwards by the Earth's gravity, so it has a constant acceleration downwards of $-9.81ms^{-2}$ (the acceleration is negative because it's reducing the velocity of the ball).

So this is an example of how there can be a non-zero acceleration (of $-9.81ms^{-2}$) but there can be a moment when the ball's instantaneous velocity is zero.


Small addition to John Rennie answer.

In fact, if you hold a ball in your hand and will release it, then the ball starts its motion with non zero acceleration but zero speed.

I think it is not trivial fact. There is an interesting story about it in the history of science. Galileo Galilei spent a lot of time to understand how a body can start its motion with zero velocity. For his time it sounded like an absurd and nobody believed him. In his book «Dialogues Concerning Two New Sciences», he convinced himself (and everybody else) by the following remarkable explanations why $v(t)$ can be zero for $t=0$:

You say the experiment appears to show that immediately after a heavy body starts from rest it acquires a very considerable speed: and I say that the same experiment makes clear the fact that the initial motions of a falling body, no matter how heavy, are very slow and gentle. Place a heavy body upon a yielding material, and leave it there without any pressure except that owing to its own weight; it is clear that if one lifts this body a cubit or two and allows it to fall upon the same material, it will, with this impulse, exert a new and greater pressure than that caused by its mere weight; and this effect is brought about by the [weight of the] falling body together with the velocity acquired during the fall, an effect which will be greater and greater according to the height of the fall, that is according as the velocity of the falling body becomes greater. From the quality and intensity of the blow we are thus enabled to accurately estimate the speed of a falling body. But tell me, gentlemen, is it not true that if a block be allowed to fall upon a stake from a height of four cubits and drives it into the earth, say, four finger-breadths, that coming from a height of two cubits it will drive the stake a much less distance, and from the height of one cubit a still less distance; and finally if the block be lifted only one finger-breadth how much more will it accomplish than if merely laid on top of the stake without percussion? Certainly very little. If it be lifted only the thickness of a leaf, the effect will be altogether imperceptible.

The second funny story was about equation of motion: since $v=0$ in the beginning of motion, Galilei assumed that the speed of free falling body should be proportional to the distance passed: $v(t)=a\,l(t)$, where $a$ is a some constant. Later he proved that such motion is simply impossible for the initial condition $l(0)=0$. Then he found the correct equation $v(t)=a\,t$.

Later John Napier consider Galileo's equation $v(t)=a\,l(t)$ for $l(0)\neq 0$ and thus he discover logarithmic function!