It depends on which algorithm (and implementation) you are using.
For instance, the linear regression implemented in sklearn
requires all input variables to be numeric and so encoding will be necessary whereas the linear regression implemented in statsmodels
can handle categorical input variables quite easily.
If your algorithm of choice requires encoding categorical features, then there are many options available (e.g. one-hot encoding, target encoding, feature hashing,...). In your example, "Race" is probably unlikely to have high cardinality and so one-hot encoding is fine. In other instances where the categorical feature can take many different values (e.g. towns in the USA) one-hot encoding may not be the best choice as it will lead to an excessively wide dataset (although using sparse structures could mitigate the consequences of this).