It is very likely CPU's and SoC's are used by hardware description languages like Verilog and VHDL (two major players).
These languages allow different levels of abstractions. In VHDL, you can define logic blocks as entities; it contains inputs and output ports. Within the block you can define the logic required. Say you define a block with input A, input B and output C. You could easily write C = A and B;, and basically you created a AND port block. This is possibly the simplest block you can imagine.
Digital systems are typically designed with a strong hierarchy. One may start 'top-level' with major functions a CPU requires: proccesor (multiple?) memory, PCI-express, and other busses. Within this level busses and communication signals between memory and procesor may already be defined.
When you step one level down, it will define the innerworkings of making something 'work'. Taken an example of a microcontroller, it may contain an UART interface. The actual logic required to make a functional UART is defined one level below.. In here, much other logic may be required to generate and divide the required clock, buffer data (FIFO buffers), report data to the CPU (some kind of bus system).
The interesting thing of VHDL and digital design is the reuse of blocks. You could for example, just copy&paste the UART block in your top-level to create 2 UARTs (well, maybe not that easy, only if the UART block is capable of somekind of addressing!).
This design isn't any kind of gate-level design. The VHDL can be also be 'compiled' in a way that it is finally translated to logic gates. A machine can optimize this far better than a human could (and quicker too).
For example; the internals of block A requires an inverter before outputting the signal. Block B takes this output signal and inverts it once again. Well, 2 inverters in series don't do much right? Correct, so you can just as well leave them out. However, in the 'top-level' design you won't be able to spot the two inverters in series.. you just see two ports connected. A compiler can optimize this far quicker than a human.
Basically what digital system design contains is the description how the logic should 'behave', and the computer is used to figure out what the most efficient way is to lay out the individual logic gates.
Your basic synchronous digital design is a sort of discrete time feedback loop.
One or more registers made of flip-flop like storage elements hold values. These flow onto buses, possibly through path selectors called multiplexers and various combinatorial logic circuits which perform a logical or arithmetic operation on the value represented by some number of signals (typically each signal being a binary digit, or bit). Over a short period of time, the result flowing through the paths and logic to circle back to the inputs of the registers stabilizes. After an interval calculated to safely allow the worst case time needed for this, another active clock edge occurs, which causes one or more of the registers to replace the current values they have been holding with the updated values being fed back to their inputs.
In the case of something like a (synchronous) a counter, the logic circuit sitting between the outputs of the registers and the inputs would add one, so each active clock edge would see the stored value increase by one.
More complicated operations such as performed by a CPU might select two source numbers from a register array from which two locations can be simultaneously accessed through two separate read ports, add them together, and write them back to somewhere in that same register array through a third writing port.
Best Answer
Basically they are fabricated in the same way as transistors.
If you look at the structure of a MOSFET, you will see that it actually has everything you need for resistors, capacitors and diodes.
The channel is made of P-type and N-type doped silicon forming two PN junctions - in fact this can be imagined as two back to back PN junction diodes. So how do you make a diode? you just remove one of the junctions leaving yourself with a PN diode. You can also make Schottky diodes using a metal-semiconductor junction if it is designed correctly. This is also something found in MOSFETs - you see metal joining the source/drain which is essentially a metal-semiconductor junction - though it is designed to not be a diode by diffusing the metal into the semiconductor, but still it's the same structure.
Now look at the gate of a MOSFET. It is a metal-oxide-semiconductor junction (in fact it can also be poly-oxide-semiconductor). The oxide acts as a dielectric forming a capacitor, hence you see talk about gate capacitance for a MOSFET as an important parameter. So you have your capacitor.
Look at the channel of the MOSFET. When conducting, it acts as a resistor. In fact the metal layers themselves are so thin they have a notable resistance, and poly-silicon can also be used as a conductor with quite a high resistivity.
So lets look at the components individually.
Diode
There are different sorts of diodes, of which P-N and Schottky are two common types. How are they made? These are made with the same techniques as a MOSFET. To make a P-N you dope one bit N-Type and a bit next to it P-Type and you have a P-N junction. For a Schottky diode you dope some N-Type silicon and build a metal junction on top.
Resistor
How do you make any resistor? Simply make a trace of resistive material of a specific width and length. This can be poly-silicon or metal in a CMOS device. The former is good for high resistance, the latter for low resistance.
Capacitor
There are two sorts, trench and metal. In the case of trench capacitors you etch down into the silicon, deposit metal, then oxide, then more metal. This forms a relatively high capacitance (for its size) which are commonly used for DDR memory. You can also form metal capacitors using the interconnect layers - basically the interconnects are layers of metal separated by a low-k (low capacitive) oxide layer. If you make that oxide with a higher dielectric strength, you can make a higher capacitance.