OK, I guess we need to be a bit more helpful than just "read the datasheet!"
One good reference on timers is here: https://www.gammon.com.au/forum/?id=11504 Unfortunately it doesn't address your specific problem in the first 10 pages, so it's still a bit of a slog to read through it.
Part of the problem is that I don't fully understand the timers myself. I can get them to do work for me but some of it is just copy-paste from other people's code.
Maybe I can provide a little overview. (I'm happy to be corrected by the other experts here.)
The hardware timers in the Arduino chips are basically counters that can count without your code having to do all the work. They are usually clocked from the main system clock but through a 'prescaler' so that you can convert the 16MHz rate of the clock down to a more useful timing interval, to get you started on the way to measuring milliseconds.
The timers are small. Timer0 is only a byte so it can only count to 255 before it resets to zero. That is a problem for counting milliseconds as you often want to measure periods longer than a second. So the Arduino framework uses an 'interrupt' at the end of the timer to add to the total count of milliseconds. But the timer is never stopped - it keeps counting while the rest of your code is away doing other things. So you never miss out on counting milliseconds.
The timers are also used for PWM (bear with me, this is getting closer to answering your question.) If you want to drive a motor at 50% power, you could start with the output pin switched on and then when the timer reaches 128, turn the pin off. When the timer overflows back to zero, turn the pin on again. So there's another value that you can give to the timer system which represents that intermediate value. You can do this with an interrupt "hey, let me know when you get to 128 and when you get to zero, ok?" or the timer can do this by itself. The timer can be connected directly to an output pin and, by setting the right options, the timer will turn the pin on and off thousands of times per second with no further interaction from your code. This is what analogWrite() does and this is why that function only works on certain pins - the timers can't do this for every pin.
If the timer always counted up to 255, that would be great but you can't control the speed very precisely just by changing the prescaler. So you can tell it to actually overflow back to zero at any number you choose. You can even give it a different start number instead of zero. That's used for various other purposes like 'phase correct PWM.'
So let's make it drive a stepper at 50kHz. That's one pulse of 1us every 20us. Imagine we had a timer clocked at 1us per step by setting the prescaler. At time=0 it should turn the pin on. At time=1 it should turn the pin off. When it gets to 19, it should overflow back to zero and it should interrupt your main code so that you can add 1 to your count of steps taken. The hardware timer will do this "forever" with no further action. If you want to change the speed, just change the number that the counter counts up to.
Note that you never actually use simple round numbers with timers. To count up to 20, you actually have to count to 19 because 0 is a number. The prescaler never quite gets you exact microseconds, so you have to do a bit of math with 12.5 counts per microsecond or whatever.