Amazon Interview Question

How does gradient descent work?