how to use atomicAdd?

Can someone teach me how to use this? And what exactly can this function do?
I’m a bit confused though I’ve already read about it, I want some sample codes on how to use it. Thank you very much.

The SDK has a simpleAtomics example (and other examples using atomics)