At the risk of paraphrasing Mrs. Beeton - first find your supervisor. Many new doctoral students do not realise that they can actually have a say in who supervises them. So it's a good idea to consider the following when you are looking for the perfect supervisor;
Find a supervisor who is knowledgeable and who understands the nature of PhD work - Every supervisory team should have at least one person on it who has supervised doctoral students to completion before. This is important because it shows you that they understand the quality and standard expected from a PhD and suggests (but doesn't guarantee) that you can have some trust in their judgement. It's helpful if you can have a supervisor that has some expertise in your field or your chosen methodology but ensure that they are open enough to respect your ideas and planned approach to your thesis otherwise you will just end up replicating their PhD (which, incidentally, it might be a good idea to skim read if you can get hold of it to get a feel for their standards of writing and ideological position and also allows you to giggle at the things they got wrong).
Make sure that they have enough time for you - Talk to the doctoral students they already supervise, if they tell you that it's difficult to pin them down for appointments or, worse, if they make appointments then cancel them regularly then approach with the utmost caution! You want someone who will read your work, comment on it intelligently and help you through the process, not someone who 'collects' students to supervise because it makes them look important.
Find someone with whom you can get on - Most importantly you must be able to get on with whoever ends up as your supervisor. This should not be a surprise, this is the person that you are likely to spend the next 3-6 years with so you need to have someone with whom you can sustain a relationship. Most PhD students will spend longer choosing a sandwich than they will choosing their supervisor, which is why lunch is often more enjoyable that doctoral study.
Finding a good supervisor can feel a bit like finding a needle in a haystack, you have to know what you are looking for, rummage around a lot and... erm, if you are not careful there may be bleeding? (I possibly should have thought this simile through a bit more). Most novice doctoral students are too worried about whether they will be able to do a PhD to think about how important it is that the person who will be taking the journey with is the right one for them but this is a very important first step.