How are compressor blades connected to the shaft in turbojet engines?
There are three primary ways that blades are connected to the shaft


Circumferential dovetails  Here is a nice site demonstrating it.  Includes STL files so you can 3D print your own demonstration part.
https://cults3d.com/en/3d-model/tool/jet-engine-component-1-1-axial-compressor-circumferential-dovetail-slot-type
Axial dovetails Here is a video demonstrating blades with an axial dovetail being assembled.  This particular video is a turbine, not a compressor, but in theory the same method can be used.

                
            
Blisk "Blisk" is a contraction of "bladed disk". The blades and the disk are physically welded together (or in some cases machined as one piece out of a solid block of metal).  Here's a wikipedia article on blisks
https://en.wikipedia.org/wiki/Blisk


Each of these methods has advantages and disadvantages in terms of weight, cost, vibration, etc.  Which one is picked depends on the circumstances.  It is also common to see multiple different methods within one compressor. For example the LEAP-1A HPC has a 10 stage compressor.  The forward stages are blisks, and the aft stages are circumferntial dovetails.