How does a denoiser work?
I am a beginner at blender but found your question amusing enough to want to find out. According to this source, Blender has just adopted Intel's Open Image Denoiser. 

From what I understand (experienced users correct me if I am wrong): It analyses the samples at the pixel level in relation to one another defined by the radius setting. Then using a monte carlo trained deep learning library it identifies noise problem areas and reduces the number of samples to simplify the path traced samples that have acted unrealistically with their random bounces.