Let’s start by defining each unit. A Graphics Processing Unit (GPU) is a component of a computer that can do mathematical calculations rapidly mainly for the purpose of rendering a 3D image on some sort of display. The GPU is an efficient component that can properly render complex and changing images, which is a major reason why computers can have complicated graphical displays and can run video games. The Central Processing Unit (CPU) on the other hand, is the component that processes many of the instructions that are fed to the computer. Hence, its name “Central Processing Unit”. Prior to the development of the GPU, the CPU also handled producing images for a computer, however, when much more complex and taxing software programs like AutoCAD came about, a unit strictly dedicated to handling images was required. Interestingly, CPUs can still be used in place of a GPU in modern machines...however, CPUs are clearly much inferior.
A good way to explain exactly what each unit is responsible for is to think of a computer game. Let’s say it is a chess game that you are playing against somebody else over the Internet. Both the CPU and the GPU will be used while playing this game to complete separate processes. The CPU will handle the “logic” of the game, i.e how much time a player has left to make a move, where each piece is, whether a player is in a position to win or not, if a move is legal, and so on. Whereas, a GPU will handle what every single piece actually looks like, how each piece will display as it moves, what the chessboard appears like, and basically everything that the two players actually see displayed on the screen. Now, the GPU and the CPU are not completely independent of one another, as they must work together most of the time in order to accomplish certain tasks. If we go back to our online chess game example, the CPU must send data to the GPU so the GPU knows when to render a different type of image. For example, let’s say Player 1 moves a pawn one space forward. The CPU will process the move, then tell the GPU that the pawn has been moved one space forward, and then the GPU will produce the animation showing the pawn moving one step ahead. Without the CPU, the game could not be played because the logic of the game could not be properly processed, however, without the GPU, the game would not display for the two players to see. Obviously, there is other hardware that is responsible for allowing the game to run on the computer, like RAM, however, for our purposes, this explanation is satisfactory.
The reason why a GPU is so much better at handling image processing and in some instances, actual computing, is due to the fact that CPUs only have a few cores, whereas a GPU can have hundreds. The reason that is significant is that the number of cores determines how many mathematical or logical calculations can be done at the same time. For example, if a computer has a dual-core CPU that is capable of only performing single-thread calculations, then the number of calculations it can do at the same time is only two. But, a GPU that has one hundred cores could perform one hundred single-threaded calculations at the exact same moment. This is also a reason why in recent years GPUs have been used when performing an extremely large number of mathematical calculations, like when mining for Bitcoin or Ethereum.
This was a very simplified explanation for the difference between a CPU and a GPU and if you want to explore some of the design and structural differences of each, I suggest you watch this video by Computerphile.