It's a combination of a lot of hardware. Each one has an id code, and Windows creates a unique code based from these that the licence key is tied to. If one component changes,then it's ok. If two change, then maybe you'll be ok, as Microsoft in their infinite generosity allows some flexibility...
It's mainly a case of "it depends". Yes, usually to upgrade a processor mean upgrading the motherboard and possibly memory as well. Some MB's can take a faster CPU of the same strain, but it's usually a small incremental gain it's not worth it.
Windows is tied into the hardware,but it's a...