Once you are past all the hurdles and working on your thesis, your course work should be very selective. Don't dilute your energy by taking too many courses, but don't miss special opportunities such as seminar courses by top researchers.
If more than one section of a course is offered, get advice on which instructor to choose. In general, regular faculty are to be preferred to visitors teaching basic courses, so that you get to know the people with whom you will be working. Try to choose faculty who are possible advisors. If that is not possible, choose the ones with the best teaching reputations, but try for a healthy mix of junior and senior faculty. Remember that eventually you will need a set of letters of recommendation in order to find a job, so it is a good idea to become known to the faculty early.
Don't make your course decisions in a vacuum. Talk to your advisor about what background would be helpful for work in a particular area. Talk to fellow students about what courses are most useful and what professors are best teachers. Talk to the instructors of courses you are considering if you have any doubts about the course syllabus or your preparation for the course.