Like, Graphic cards, hard disk, sound, etc. that we do in PC in order to play newer games?
Apart from the HDD, you can't really upgrade anything (potentially apart from hardcore console modding, but certainly nothing standard). You will need to upgrade in a way, but that would be by buying an entirely new console whenever another generation comes out.
For example, many (not all) games that have been released for PS4 are not playable on a PS3, simply due to various hardware limitations (different processor/memory architectures between console generations, faster/better components able to support higher resolutions, etc.). You will need to upgrade. A new graphics card cannot be slapped into a PS3 to improve it.
That said, a game developed for PS3 is expected to run on any type of PS3, regardless of how old the model. A PS3 is always going to be a PS3. Consoles are designed to be more "plug and play" than PC, but of course you lose that flexibility in your hardware.
I like to elaborate on the "hardware design stability" in @DangerZone's answer a bit.
When you want to run a PS3 game, it will run on any PS3 model, regardless whether it's a model from 2006 or 2012. But not only will it run, it will run exactly the same (apart from differences due to different HDD performance). The hardware of a console may change, but the manufacturer (usually) takes care to only do changes that have no effect on compatibility. This means that a program (game) usually does not see any relevant difference between the various models. The only difference is usually HDD performance (for systems that have these).
This stability is an essential property of consoles: game developers can rely on the fact that they will always encounter the same environment, even throughout different models of a system, and can do extreme optimizations for the hardware they run on that are usually not feasible on a PC.
It's also not a "new" property of consoles in any way: there also were different models of the Super NES, for example. One reason why manufacturers do different models is because they thrive to make production cheaper and thus increase margins and/or make the system cheaper for customers.
There are few exceptions to this: for example, some consoles support additional hardware and there are models that then have the additional hardware already integrated. There were numerous models of the Sega MegaDrive (Genesis in the US) and it supported a CD drive add-on (it did more than just provide the drive, though). There then was a model that integrated the MegaDrive and the CD drive add-on into a single case. Another interesting example of violating the "equal hardware" assumption is the Nintendo N64, where you could upgrade the RAM from 4MB to 8MB.
Lol this is a kind of a hilarious question. Why so many upvotes? Apparently game developers will keep the hardware capacity of those devices in mind when they're developing games, and the games they publish will run totally fine on the target platform, otherwise it'd be a fail on their side.
The only case when you need to "upgrade" is when the next-gen console comes out, i.e. PS4 and XBox One. In such cases new games will be published in the new platforms, and those games will most likely not support the old platform at all. However such an upgrade cycle will likely be significantly longer than a typical PC upgrade cycle.
Of course you might argue that the same game might run with better graphics on newer PC hardware compared with console which has been there for several years. However IMO gaming console graphic quality is good enough for most eyes. Also you'd have to consider that since consoles are dedicated to gaming, serious optimizations are in effect and they'll be much more efficient than PCs with similar hardware specs.