A slider is used whenever a numeric value within a certain range is to be obtained.
The advantage of a slider over text input is that it becomes impossible for the user to enter a bad value. Any value that they can pick with the slider is valid.
Let's look at some slider examples:
What you should see: Many sliders with very different styling and behaviour.