Pergunta de entrevista da empresa Sportradar

How does the gradient descent work?How do you determine if the gradient is stuck in local minima or global minima? How does it determine the next path that it should take?