The learning rate scheduler adjusts the learning rates stored in the optimizer.
In your example a step function is used to lower the learning rate after 7 steps with a multiplicative factor of gamma=0.1.
Assuming that your initial learning rate is 1e-1:
optimizer = optim.SGD(model.parameters(), lr=1e-1)

Now after scheduler.step() is called 7 times, the learning rate will be lowered to
lr = 1e-1 * gamma = 1e-2.
This schedule looks like a step functions, thus the name.
There are also other functions, like ExponentialLR or CosineAnnealingLR.
You can find all schedulers here 61.