Good answers are provided, I only want to address your statement that:
i want to understand what actually happens in this scenario
To do that, you would have to conduct an experiment. While we model this situation with nice smooth functions such as, in this case, $v=v_0-gt$, in the real world, you would have to do something like the following:
- Record as accurately as you can, the heights $h_1$ and $h_2$ of the object at two nearby instants of time $t_1$ and $t_2$
- Calculate the average speed over this interval
$$\bar{v} = \frac{h_1-h_2}{t_1-t_2} = \frac{\Delta{h}}{\Delta{t}}\tag{1}$$ to get a good approximation of the speed the object obtains during this small time interval.
(The bar over $v$ means average, not a vector)
Now, suppose you have conducted such an experiment, and you have a big notebook full of data entries that look like:
$$
(h_1, h_2) = (4.432m, 4.438m)\\
(t_1, t_2) = (1.21s, 1.235s)\\
(h_1, h_2) = (4.438m, 4.47m)\\
(t_1, t_2) = (1.235s, 1.295s)\\
(h_1, h_2) = \dots
$$
You may ask yourself now the question, is there a simple way to find an entry for which the above calculation $(1)$ yields $\bar{v}=0$?
So first, we notice that $\bar{v}=0$ only when $h_1=h_2$. What does that mean?
It means that if we want to record accurate readings of the heights and times corresponding to when the object reverses its direction, we need a height sensor that is sensitive enough to be able to resolve small differences in heights, obtained by the object at nearby instants of time, since clearly, as the object reaches the maximal height, it traverses smaller and smaller heights at equal (even if also small) intervals of time, which is just a fancy way of saying it slows down! :)
Now, if the height sensor's resolution is quite crude, and can for example only detect a position change in "chunks" of $10\text{cm}$, we may make a measurement in which the object's speed will appear to be zero $\bar{v}=0$. For example, if the object rises $3\text{cm}$ in tenth of a second ($0.1s$) we clearly won't be able to measure the speed correctly for that small time interval. Our readings of speed will only reflect averages taken over height intervals of $10\text{cm}$. So it's important, when plugging experimental data into an equation such as $(1)$, to take into account the resolution of our instruments. Getting $\bar{v}=0$ doesn't mean we actually managed to measure "the instant in which the speed vanishes" if we have a high resolution clock but a crude height sensor. The point here is that our equations, even when theoretically correct, can't give us good results if we feed them with poor data.
A similar thing happens if our clock resolution isn't very good: the denominator $\Delta{t}$ will become zero and the speed will be undefined. This simply reflects the fact that we can't compute an average speed over a time interval that we measured to be zero, and it just means that our instruments can't resolve this small time interval correctly.
So we see that we need to take care to only average over time intervals in which both our clock can resolve time correctly, and our height sensor can resolve distance correctly, so that $\Delta{h} \neq 0$ and $\Delta{t} \neq 0$. If we do that with reasonably good* instruments, plug our results into $(1)$, and plot the obtained $\bar{v}$ values as a function of the measured time $t$, we will get a graph similar to the following:

The above graph comes from a very primitive numerical simulation of such a situation, where we've thrown an object upwards. Each time interval is a thousandth of a second ($0.001s$) long, and the speed for each instant is plotted vertically. With real experimental data not all time intervals will be necessarily exactly equal, so this is still obviously an idealization. However, as you can see, we never actually measure the exact instant in which $\bar{v}=0$, but nevertheless such experimental data implies the object does momentarily obtain actual speed of $v=0$, despite the fact that we can only measure this directly to the degree that our instruments allow us. In fact, it can happen that in a certain experiment of this kind we will get $\bar{v}=0$ identically, not because of lack of resolution of the height sensor as I've mentioned before. I'll leave you to think about how that can happen exactly, but the point is, even then we are only measuring the average speed, never an "instantaneous" speed.
To summarize: Instantaneous speeds belong to the realm of math and calculus, while average speeds is what belongs to the realm of experimental Physics. But like in many other cases, experimental facts make us trust that "the one realm approaches the other" and we are doing the right thing when we model this and very many other situations via nice "smooth" functions such as, in this case, $v=v_0-gt$.
Full disclosure: I have near to zero experience in Experimental Physics, so I hope I am not making any gross oversimplifications here. I only wanted to convey some sense of what it would take to actually try to observe and demonstrate this phenomenon of speed vanishing experimentally.
*What are "good" instruments is ultimately decided according to the accuracy to which you want to perform your experiment