Nitriding is a metal treatment. Cerakote is a polymer finish applied on top of metal.
Nitriding, done properly, puts the metal in a salt bath held at a specific temperature, then it gets put into a polisher of some sort (generally a vibratory polisher filled with ceramic polygonal shapes that do the polishing as well as possibly some other hand-polishing processes), and then it gets put into another salt bath, and then it gets oil dipped. The idea is to form an oxide on the surface...iron oxide...that actually acts as a barrier to stop further corrosion. It also has side benefits of increasing surface hardness and makes the surface smoother/slicker.
Cerakote is a spray-on polymer finish that requires thoroughly degreasing the gun, bead blasting, and then applying it like a paint.
Of the spray-on finishes out there, Cerakote seems to hold up well with some colors performing better than others. I have a Remington 870 that is used heavily for instruction and the Cerakote refinish I had done on the gun has done well. The moving parts show wear, but less than I would have thought over the use the gun has seen.
The nitriding/nitrocarburizing/qpq/whateverlabelyouwant process is superior because it's an actual surface treatment. It also tends to be a little more expensive and vulnerable to errors in the process.
Cerakote is easier for a smaller operation to accomplish and if they do a good prep of the part before spraying it then it should be reasonably durable.