Can students take any class they want?
Various schools have different ways of making classes available to students. When you are doing your research, that is one of the things you will want to investigate about the schools at which you are looking.
Some schools may have absolutely open scheduling options, but those schools would be in the minority. Most have some sort of framework of scheduling which will lead their students to a well-rounded education.
There is a wide spectrum of class scheduling possibilities. Some institutions have a special program of studies that students are required to complete. This program may be centered around Great Books, World Philosophies, etc. These programs are sometimes, but not always, focused on first-year students. Many schools require first-year students to complete or exempt basic classes in Mathematics, English, or Writing.
Other schools have something which they call "distribution requirements" (the name will vary from one institution to another). In this case, students are required to take courses in a set variety of disciplines, with a wide range of actual class choices being offered within each discipline.
For example, one highly-regarded university has the following basic requirements of students working toward Bachelor's degrees:
Writing Seminar--one course
Foreign Language--one to four terms to complete, depending on the language
students study and the level at which they start
Epistemology and Cognition (EC)--one course
Ethical Thought and Moral Values (EM)--one course
Historical Analysis (HA)--one course
Literature and the Arts (LA)--two courses
Quantitative Reasoning (QR)--one course
Science and Technology (STL/STN)--two courses. At least one course must be a
science and technology course with laboratory (STL).
Students may elect a second laboratory science course, or
a non-laboratory science course (STN).
Social Analysis (SA)--two courses
Within those broad areas, a wide range of class options are offered, assuming that students have met any prerequisite requirements. In addition to the courses within the distribution requirements, the student will ultimately focus more specifically on classes which fall within his/her chosen major. Some of the distribution requirement courses will quite possibly apply to a student's major or minor, as well. By being required to investigate a variety of disciplines, students often discover a dormant interest - something that they had not previously considered, which will lead them to pursue another direction of study.
Keep in mind that requirements will differ from one school to another. The above distribution requirement description is merely an example and relates to a specific institution. Therefore, an important part of your university research will be in determining course requirements, how classes are scheduled, and how course material is delivered - large lectures, small classes, large lectures followed by small-group seminars, etc. Consider how you would learn best.