How does NSFetchedResultsController observe changes?

NSFetchedResultsController is able to watch edits, inserts, and deletions in a coredata managed object context, and keep a UITableView updated accordingly.

I vaguely understand it’s done by KVO. I can see how this can work with edits but I’m unsure about insertions and deletions. I would certainly like a deeper understanding, to the point where I could implement a similar class for myself. Can anyone outline the secret sauce of NSFetchedResultsController magic?