PURPOSE: Coronary artery disease (CAD) is a leading cause of morbidity and mortality worldwide, with coronary computed tomography angiography (CCTA) playing a crucial role in its diagnosis. The mean Hounsfield unit (HU) of pericoronary adipose tissue (PCAT) is linked to cardiovascular risk. We utilized a self-supervised learning framework (SSL) to improve the accuracy and generalizability of coronary artery segmentation on CCTA volumes while addressing the limitations of small-annotated datasets. APPROACH: We utilized self-supervised pretraining followed by supervised fine-tuning to segment coronary arteries. To evaluate the data efficiency of SSL, we varied the number of CCTA volumes used during pretraining. In addition, we developed an automated PCAT segmentation algorithm utilizing centerline extraction, spatial-geometric coronary identification, and landmark detection. We evaluated our method on a multi-institutional dataset by assessing coronary artery and PCAT segmentation accuracy via Dice scores and comparing mean PCAT HU values with the ground truth. RESULTS: Our approach significantly improved coronary artery segmentation, achieving Dice scores up to 0.787 after self-supervised pretraining. The automated PCAT segmentation achieved near-perfect performance, with CONCLUSIONS: We demonstrate the potential of SSL to advance CCTA image analysis, enabling more accurate CAD diagnostics. Our findings highlight the robustness of SSL for automated coronary artery and PCAT segmentation, offering promising advancements in cardiovascular care.