How are optimizer.step() and loss.backward() related?

Double post with answer from here.