Cavitation is a transient, highly complex phenomenon found in numerous applications and can have a significant impact on the characteristics as well as the performance of the hydrofoils. This study compares the evolution of transient cavitating flow over a NACA4412(base) (NACA stands for National Advisory Committee for Aeronautics) cambered hydrofoil and over the same hydrofoil modified with a pimple and a finite (circular) trailing edge. The assessment covers sheet, cloud, and supercavitation regimes at an 8° angle of attack and the Reynolds number of 1×106, with cavitation numbers ranging from 0.9 to 0.2. The study aims to comprehensively understand the role of the rectangular pimple in controlling cavitation and its impact on hydrodynamic performance across these regimes. Numerical simulations were performed using a realizable model and the Zwart–Gerber–Belamri (ZGB) cavitation model to resolve turbulence and cavitation effects. The accuracy of the present numerical predictions has been verified both quantitatively and qualitatively with available experimental results. The present analysis includes the time evolution of cavities, temporal variation in total cavity volume, time-averaged total cavity volume, distributions of vapor volume fractions along the chord length, and their hydrodynamic performance parameters. Results demonstrate that rectangular pimples have significant impacts in the different cavitation regimes. In the sheet cavitation regime (σ=0.9), the NACA4412(pimpled) hydrofoil exhibits minimal cavity length and transient volume changes as compared to the NACA4412(base) hydrofoil. In the cloud cavitation regimes (σ=0.5), cavity initiation occurs differently, starting from the pimpled location for the NACA4412(pimpled) hydrofoil, unlike the initiation just downstream of the nose in the case of base hydrofoil. In the supercavitation regimes (σ=0.2), the cavity length remains comparable, but the NACA4412(pimpled) hydrofoil exhibits larger cavity volume evolution in both cloud and supercavitation regimes (σ=0.5 and σ=0.2) after initial fluctuations. Furthermore, hydrodynamic performance for the NACA4412(pimpled) hydrofoil shows 41%, 36%, and 17% lower lift coefficients, and 46%, 27%, and 9% lower drag coefficients in sheet, cloud, and supercavitation, respectively.