What consumes the most power in a computer
A computer is usually defined by what it does rather than how it is built.  Computers can (and have been) built from vacuum tubes, relays, discrete transistors, and integrated circuits (not a complete list). A simplified definition of a computer is that it is a device that takes inputs, operates on them in accordance with a set of instructions (which can be changed by the operator or even during operation) and then provides outputs which can be used to perform operations such as printing, running machinery, playing games, etc.
All of the electrical energy consumed by a computer is turned into heat except for the relatively small amount that is contained in its outputs.
The heat is partially from energy consumed in running current through the computer wiring but is primarily from the energy consumed by the transistors in the logic circuits that simultaneously have voltage across them and current through them.  This energy is especially significant when the transistors change their states by switching between logic levels. This is why microprocessors dissipate more energy as their clock frequency increases.