How are PhD students assigned to supervisors/professors?
(2) A department offers PhD studentships. After admission, students
  can choose their supervisors or the department will assign them to
  available professors.
  
  In this case, how the capacity of each faculty member is determined to
  accept PhD students from available students of the department?


This is generally the norm in US universities. How the capacity is set depends on various funding-related factors:


Does the department support all incoming Ph.D students via fellowships ? Then there's a budget associated with this.
Does the department support all incoming students via fellowship or teaching assistant positions ? Then based on estimated enrollment of students in courses there's a rough formula estimating number of TAs needed each year, and this factors in how many students are leaving. 
Does faculty funding support students (either from Day 1 or eventually) ? Then the department will solicit information from faculty on how many students they expect to support that year, and make calculations accordingly. 


All of these are estimates, and can go wrong. So departments usually need some kind of cushion  when doing calculations to adjust for that. 

While departments might "assign" students to faculty when they enter, this is probably for administrative purposes so students don't slip through the cracks and have someone they can approach early on. Typically students and advisors choose each other once the students arrive.