This method uses Gradient descent algorithm. It uses number of small steps (iterations) And with each step use New theta values which results in smaller cost function value. After a while it comes to local minima (minimum cost function).