How does applying to work with multiple potential advisors at a university work? I plan on applying to some graduate programs for a psychology PhD. At some of these universities, there are multiple professors I am interested in having as an advisor. If I am accepted to the program, how is my advisor chosen? Does my order of preference get taken into account or does it depend on which professor express the most enthusiasm to have me? Experiences may vary of course but any insight into this process would be helpful.
The picking/assignment of adviser varies dramatically by institution and department. In some institutions - for instance, in some of Carnegie Mellon's departments - the student chooses their adviser (and optional co-adviser) during the first month of their first semester after admittance, and the adviser needs only to agree. Advisers usually can say yes to any request they want because the department funds all new PhD students for the first year - and thus only becomes responsible for funding the student after that year. But some departments don't have the same policy!

A friend at Berkeley told me that their adviser actually saw their admissions packet and reached out to them to say, "I know you said you wanted to study X, but I think you'd enjoy topic Y that I'm working on" - and the student accepted and thus gained their adviser (in an entirely different field than they applied).

As yet another variety, I'm told that at some institutions the student is admitted with no adviser and the expectation is they will work with various potential advisers in different semesters for the first 1-2 years before being expected to formally have a permanent adviser. 

The variety of systems is heavily influenced by the nature of how funding is handled at the school, as well as how admission is handled. In many institutions only the admissions committee decides on who is admitted and then advising comes later, while at others at least initial advising is part of the admission process (students are paired with potential/initial advisers before admission, and if you don't fit a professor with an open student slot then you don't get admitted).

Luckily this process is usually not a big secret, so you can talk with graduate admissions coordinators at departments you are interested in to find out just how things work there. Current PhD students are also often helpful in willing to share how they got their adviser, but be aware that their experience may or may not be typical (and sometimes they don't actually know).

Finally, there is great variance between institutions, and between departments within the same institution - and even greater variance between countries - and yet more variance across time as departments change their policies and strategies to recruit and retain students. So in the end - you'll really have to ask that specific department near the time of application to find out how thigns work