Pretty much exactly what they do depending on the compound, buffer pad and speed of the buffer. Do it wrong and you get hologram swirl marks or can burn right thru your finish. Wet sanding (color sanding) is the same thing only more abrasive and even that has to be buffed out afterwards.
It's only detrimental to use a buffer on your car if you don't know what you're doing or do it too much. Not every little scratch needs a 1700rpm pad being blazed across it when it could've been gotten out by hand. I buff my car once maybe twice a year with the exception of if I get a little scratch but I know what I'm doing and I have years of experience. However I will POLISH my car more than that with an orbital like a Porter or Flex polosher. To me "buffing" is using my Milwaukee rotary that spins at almost 1800 RPM, is not adjustable, weighs half a freakin ton and can and has easily burnt thru paint. Thats what I get for buying another black car.