What is inside a GPU changed quite a bit over the years.
At first we only had 2D capabilities and a "graphics card" was actually called a video adapter since it was just a dual port RAM with a VGA DAC on the other side of it, it could also be run trough a character ROM to create text. The fanciest graphics functionality back then was basically glorified DMA transfers to move blocks of data around.
The first actual graphics accelerated GPUs used in PCs were basically ASICs purpose built for doing the major operations of 3D rendering. These are so called "fixed function" GPUs where there are blocks dedicated for certain operations that get strung together to form the 3D rendering pipeline. So it might have a geometry transformation block that can apply transformation matrices to a pile of points (useful for implementing a moving camera in the scene), it might have a block for Z sorting vertecies, it might have a rasterization block that draws triangles between vertices, this might interact with a texture mapper block that pulls pixels from textures and filters them smooth...etc Back in this day 3D applications had to have their rendering code specifically designed to work with the functions available in the particular GPU.
Then as computers got faster and graphics tasks more demanding it became clear that a more flexible and universal solution was needed. So programmable shader pipelines were introduced. This is a new concept where instead of hard wiring the common functions we instead create a small processor core that is more DSP like (aka really really good at math on large amounts of data), this core executes machine code much like a CPU, but works with data in a very parallel way. These are called shader cores and we can program them to do whatever we want. The 3D application can choose a pipeline it wants and program it into the GPU. Modern cards have 1000s (some even >10000) of these shade cores, giving them an incredible amount of math performance. They are now flexible enough to even be used for non graphics tasks that involve a lot of data and math. Like DSP, simulations, cryptocurrency mining, AI ...etc
There are still some dedicated sections more optimized for certain tasks (also coming in multiple cores so that the GPU vendor can scale the GPU for higher performance models by just adding more cores). Notably in the new generations getting new types of cores like tensor cores (really good at integer math, useful for AI) or raytracing cores (does what it says on the tin)