I've heard many people talk about that there being CPU and GPU but I have always wondered how do they work and if you are using one more than the other what are the best settings to keep (assuming that you are rendering an image with a lot of reflection, D.O.F etc.)? What actually happens inside your computer?
As of today, according to the Manual, the only significant difference in features is the ability to use OSL in CPU mode. OSL allows you to create custom shaders. Other than that, there should be little if any difference in the output of CPU and GPU renders although you may have different noise patterns.
Of course, then there's the speed difference. For the price, GPUs are more cost effective for faster rendering (although a recent spike in price caused by lack of availablilty due to the Ethereum craze has made that less so). Even though certain processors like AMD's new Ryzen 16-thread processors can be faster than some decent video cards, they are also expensive, and you can only have one in your computer at a time.
With GPUs you can have up to four in typical consumer motherboards. I have three different GPUs running in my rig at the moment. They are all nVidia Cuda-based but they're three different model based on budget. They can absolutely slaughter my i7-6700k (8-thread) at 4.4GHz. This is because GPU's are really good at parallel processing. My CPU has 4 cores (2 threads per core) but my video cards have over a thousand each. 3D Rendering happens to be a really good mathematical scenario for mass parallel processing.
Consider this scene rendered at 1200x900 with 500 samples:
The ($340) CPU rendered it in 7:02 but the three GPUs rendered it in 1:51. This does require tweaking the tile size settings though. There is a lot of poor or anecdotal suppositions out there about tile size and nobody seems to really understand why or what to set it to. Keeping the tile size to a certain multiplied number yields the fastest render times.
For GPU's the tile size typically needs to be a X and a Y number that multiplies out to 65,536 (256x256). I have a 128-bit card with 768 Cuda cores, a 256-bit card with 1664 cores, and a 256-bit newer architecture card with 1280 cores. They all perform most efficiently with a 65,536 tile size. I don't know why and I have yet to find anyone who can explain why.
But the ratio of the tile size will vary based on the ratio of your render. You want the tiles divided such that there are no "fraction-tiles". What I mean is that you should have a whole number of tiles. For instance, with 1920x1080 renders, I choose 240x270 tile size.
This yields exactly 32 equal tiles and 240 x 270 = 64,800. This is the most efficient GPU render of a 1080p scene:
For CPU's you can set it to 16x16 or 32x32 and forget about it. There's no reason to try to calculate it for each render ratio because the differences are so small.
Another consideration is scene size... memory. With the CPU, the scene is stored in system RAM. This kind of memory is cheap and you probably have 16 or 32GB of it. With GPU rendering, you use the memory on the video card. Video memory is more expensive so you typically don't have as much of it. My most expensive card has 6GB. You are limited in your Blender scene to the least amount of memory that one of your cards has. My lowest end card has 4GB, so if I want to use all three GPUs to render a scene, that scene must require less than 4GB of video memory.
Let me know if you have a specific question that I haven't addressed.