We investigate the dynamics of convergent shock compression in solid cylindrical targets irradiated by an ultrafast relativistic laser pulse. Our particle-in-cell simulations and coupled hydrodynamic simulations reveal that the compression process is initiated by both magnetic pressure and surface ablation associated with a strong transient surface return current with density of the order of 1017 A/m2 and lifetime of 100 fs. The results show that the dominant compression mechanism is governed by the plasma β, i.e., the ratio of thermal pressure to magnetic pressure. For targets with small radius and low atomic number Z, the magnetic pressure is the dominant shock compression mechanism. According to a scaling law, as the target radius and Z increase, the surface ablation pressure becomes the main mechanism generating convergent shocks. Furthermore, an indirect experimental indication of shocked hydrogen compression is provided by optical shadowgraphy measurements of the evolution of the plasma expansion diameter. The results presented here provide a novel basis for the generation of extremely high pressures exceeding Gbar (100 TPa) to enable the investigation of high-pressure physics using femtosecond J-level laser pulses, offering an alternative to nanosecond kJ-laser pulse-driven and pulsed power Z-pinch compression methods.