Microcontroller timers and their applications
Timers are attractive because they are hardware-defined.  This means that it uses actual silicon to perform the counting operation.  You can set-and-forget (for the most part).

There will be some code you need to write to initialize the timer's parameters, and tell it to start running.  This can be found in the MCU datasheet.  While it's counting in the background, you can run your MCU like you normally would.

Generally, a timer will count up until it's value matches some value you have given it to compare against.  When this happens, an interrupt service routine (ISR) will be called to handle the event.

If you aren't familiar with ISR's, I would recommend learning about them.

Timers are useful for situations such as handling high-speed events like PWM, or accurately measuring time-sensitive events like incoming pulses, to name a few.

I hope that this helps.