The first thing to know when designing jet engines, is everything leaks. But the OD of the engine core is generally pretty tight. This is achieved using large solid structural pieces, for example the entire LPT outter casing is generally one piece. These large pieces are bolted together with an excessive number of bolts to make them very tight. Any penetrations will have various types of seals and gaskets, as well as high clamping forces. Although the outer case is pretty tight, the cavity between the core case and the bypass duct is still actively purged with air from the low pressure compressor (labelled as undercowl cooling on the image below).
GE90 Engine Airflow Diagram (This is actually a widely available training poster but I stole it from here, you can find similar for just about every engine)
As for the inner side of the core, this is where literally everything leaks. As you can see in the picture above, Stage 1 (S1) High Pressure Compressor (HPC) bleed air is used to actively purge the cavity under the Low Pressure Compressor (LPC) and early stages of the HPC. It is then plumbed though a small duct around the low pressure shaft to the Low Pressure Turbine (LPT) (zoom in on the image and flow the arrows in the yellow fill).
Your location number 1 is the split between the LPC rotors (spinning) and the Fan Frame (stationary). Your location number 5 is the split between the LPT (spinning) and the turbine rear frame (stationary). In these locations (and in all gaps in the ID of the core) the air is allowed to flow back into the flow path. The purge air must be at a higher pressure the flow path air, and allowing it to flow back into the main flow path actively purges these gaps and in the turbine prevents hotter gas path air from backflowing into the rotor cavity.
Your location 4 is at the end of the compressor and beginning of the combustor and is known as Compressor Discharge Pressure (CDP) air. The image below (source) shows what is going on here. A faction of the air is directed directly into the combustor through the fuel nozzle assembly, while the rest bypasses and is used as dilution air, as well as combustor liner cooling. Another faction is taken off the OD to cool the S1 HPT Vane and Shroud, while a larger fraction is taken off the ID to cool the S1 HPT Vane, Blade and rotor, as well as actively purge the gap between the S1 blade and vane. If this cooling air was ever lost, the HPT would literally oxidize/melt/creep away in a matter of seconds. The gap at location 4 is sized so the correct about of flow goes into the combustor dome and the right amount bypasses the fuel nozzles. Note that in ultra modern combustors, the diluation holes no longer exist and a much larger fraction of air enters at the fuel nozzle location.
Torque is transferred from the HPT to the HPC through the spool arms (basically a shaft), which is what connects each rotor to each other. I have highlighted this in red in the image below. The full spool is created in multiple ways. Some of the HPC rotors are forged together into sub-spools. Some of these sub-spools are welded together (becoming more common) and then some joints are done with bolts. In the second image below, is the HPC spool for the CFM56, I have circled the bolted connections. Bolts are generally used when there is a change in materials so welding can't be done. The first couple of stages will be Ti, while the later stages are a Nickle based super(ish) alloy. The HPT rotor is a Nickle based super alloy but is generally being pushed to the limit too much to be welded. When it is all put together, you have a very stiff shaft.
The stators are attached to the outer casing. Generally there is a circumferential slot in the case, the stators slide into this slot. Generally the stators are brazed together in multi-vane assembles to reduce air leakage. There is also a labyrinth seal on the ID of each stator to reduce air leakage.
The S1 and S2 HPC rotors (your location 2) have a larger ID than the other rotors so they can fit over the bearing race when they are unbolted from the spool and to allow tool access to the bolts. The S3 rotor is the largest because it support the arm going to the bearing, a still largish blade and the bolted joint of the spool join. As you go aft the rotors get a little smaller because they support smaller blades, but that is counter acted by raising temperatures that reduce the material capabilities.
Overall engine assembly (Youtube Video of GEnx-2B being assembled). Depending on the engine it'll be assembled from Fan back or LPT forward. So from LPT forward (Very simplified). First take the built up LPT module and attach the LP shaft (aka fan shaft/fan mid shaft). Next, you would build up the HP section including outer casing seperately, then slide this onto the LPT, attach the HPT outer casing to the LPT case with an excessive number of bolts, if there is a mid turbine frame it would be installed between the two turbines with bolted joints on both sides. Then you install the fan frame to the HPC case and then the fan spool to in the LP shaft and the fan case to the fan frame. With the right tools, it all slides together pretty easily. One way the LP shaft is connected to the LPT and Fan Spool through splined connections and a large coupling nut is installed on each end of the shaft to prevent the splines from backing off. Sometimes the shaft is bolted directly to the LPT or Fan spool directly.
Sorry for being so long winded, but I hope that answers your questions.
Here is one more flow diagram for reference (source):