Coroutines - When and how to use them

Can someone explain to me how and when this function is ran?

I hope there was more people like you doing this kind of tutorials with such a good explanation