Statistical analysis of anatomical features

I am trying to learn how to run statistical tests like t-tests, Kolmogorov-Smironov tests etc on two groups of subjects whose brain anatomical features are available. For example, as mentioned in this paper, in section 2.4,

“Structural T1 volumetric data were processed with FreeSurfer. Using the FreeSurfer BrainSegNotVent variable, we compared brain size between the two groups with age and gender as covariates. No significant group difference was found.”

I am wondering how to, for example, do the above analysis and run other statistical tests on such data so as to select the most important anatomical features for classification between the groups. Can someone explain with some code ?