What does indexer do with new committed transactions?

I need to understand the whole procedure of how indexer works. I understand how when I first set it up, it populates a database and load the whole ledger into the database. However, when and how indexer keeps up with the transactions that later get committed to the blockchain? Does it always run in the background as the node catch up with the latest block?

Basically it just calls the Algod API for the next block after the most recent one committed to the database.