Gradient Descent (in general)

what do these following lines represent in the gradient descent algorithm :

  1.  x=x-lr*grad
    
  2. error.append(y)