Each player has a level of affiliation with each of the four factions, measured by affiliation points, up to a maximum of 6000. If your level of affiliation to one faction is higher than to all the others, you count as affiliated to that faction. Things get a bit more complicated when you reach 6000 points with multiple factions, at which point you are afifliated with whichover of those factions you last paid respect to.
Affiliation points can be gained by paying respect to a faction, by doing jobs and defeating bosses, by winning wars or duels (you gain affiliation points for the faction your target belongs to), and by using the unleash dogs execution method.
Each faction grants rewards for reaching certain levels of affiliation with that faction. Rewards are granted at 100, 300, 600, 900, 1200, 1600, 2100, 2500, 3500, 4000, 4500, 5200, and 6000 affiliation points. See the individual faction pages for details of the rewards granted by that faction.