How to include user features in a recommender system?
This is referred to as side information. This is used to enhance the recommender system.
A good library for collaborative filtering (and beginner friendly) is turicreate. Have a look at this link. o summarise, the traditional, basic matrix factorisation will encode user i and items j respectively as vectors $u_i$ and $v_j$ so that the predicted score that a user would give to the unseen item is:
$$
score(i,j) = u_i^T  v_j
$$
but you can have a more complex model that will also take into account idiosyncratic characteristics of both items and users:
$$
score(i,j) = u_i^T v_j + a^T x_i + b^T y_j
$$
which increases the capacity of the model.