I'll take an example to undestand your requirement.
If you have two variables in your data, Pregnant (binary variable taking values 'Yes' and 'No') and Age (continuous). If you want to test whether there is a significant difference in the mean age between those who are Pregnant and those who are not, you might consider 't.test' in R under the assumption of unequal variance.
Your null will be
Ho : the true difference in the age is zero
H1 : true difference in mean ages is not equal to 0
Then you can state you assumption based on the p-value.
As for your doubt, no you dont have to convert age to a categorical variable.
I hope I've understood your requirement correctly.