Party identification is affected by many demographic factors. Americans' choice of party is affected by such things as their race or their ethnicity. It is affected by whether they live in rural areas, suburbs, or cities. It is affected by the amount of education they have and the amount of wealth that they own. It is affected by their age and even by their sex. In today's America, it is also affected very strongly by what religion they are and how strongly religious they are.
Republicans tend more often to be white, male, religious and wealthy. Democrats are the opposite. Of course, these are only generalizations because not all people of these categories have the same opinions. However, statistically speaking, these are some of the major factors that affect party identification.