If you purchase a pre-assembled computer, you have a right to warranty on the way these parts are assembled in on top of the warranty of each single part. You can actually go and claim damages if, e.g. the cooling isn't sufficient and the CPU gets damaged because the fan was improperly installed. This is of course out the window if you open the case because it's no longer possible to determine whether you have tampered with it and hence whose fault it is that the heat sink wasn't properly installed on the CPU.
NOPE. At least, that's not how it works in the US of A, and if that's how it works in your country, you are getting a hard sandpaper fucking. The PC is a modular product made to be upgraded. If they don't want you tampering with stuff inside of it, they need to put a tamper seal on each thing they don't want you touching. And if I need or want to replace it, so long as the replacement item meets specifications, then I can do that without voiding my warranty. Then the issue of what claims were actually made comes into play. The system is sold for example as having PCI slots and a certain CPU socket, so if you install cards which comply with the PCI spec then they can not void your warranty for that.
Cars work the same way, everyone likes an automotive example. As long as I use fluids and parts which meet OE spec, I can interchange them freely without voiding my warranty. If I should replace an engine part (say, the intake manifold) with a part which is outside specifications (like a supercharger) then I'll void the warranty only on parts which are affected by the change, in this case the engine and maybe other powertrain components. But if a switch in the cockpit fails, that's still covered.
TL;DR: No sane warranty system voids warranties on modular products just for opening the case.