As a master's student in computer science, I would really like to go for a PhD at a good CS department. However until now, I have no publications and really have no idea how to start research. I'm interested in many subjects but I have not yet been able to narrow down the choice to a specific one. For someone like me who just began his or her master's studies and wants to plan for a PhD, what is the real number one priority besides a good GPA?
I would say publications dont matter to start with a PhD, in general. Having them might help in reducing length of your PhD.
A good thing to have is liking for one area in CS, and good knowledge in that area atleast. e.g. systems or security or algorithms or formal verification or databases or distributed systems etc. Later when you join for the PhD program, you will do courses and talk with people to get an understanding on what is a good research problem etc.
If your Masters degree is a degree by research then you'll already be starting down the road of learning just how to carry out a research project. So you're in the typical position of most undergrads transitioning to postgrad studies. At that stage it would be quite unusual for you to have been able to contribute to a research paper (based on my experience working in universities in the UK, Germany and Australia).
As you progress through your Masters you will hopefully have the opportunity to investigate areas which may interest you, and narrow down which field(s) might suit your intentions to pursue a further degree. Perhaps during this time you will contribute to some piece of research which will be published before you graduate. Given the timescales involved in academic publishing though this is unlikely unless you, join and make a final contribution to, an established project (for example). This would possibly make you stand out a little more when applying for doctoral positions, but it would not be essential. Masters level research frequently does result in publications, but these may come out some years after you complete the degree (depending on the field of course)!
If your Masters does not have a research component then you will have to make some time to do some independent reading, study recent publications in your field etc and get a sense of what research groups / professors exist whose interests would match yours.
The number one priority would definitely be defining and establishing your interests. So you want to find out what in CS you are enthusiastic about and committed to investigating, and be able to demonstrate that genuine enthusiasm when applying. A good PhD student is in effect a colleague in training rather than a student to be taught, and you want to be able to show that's what you have the potential to become.
This, I admit is a somewhat idealised view of what I would want to see in a prospective PhD student. Where you're located, which universities you wish to apply for, and how they deal with admissions (among other things) will all have specific impacts on what is important. So you'll have to discover, and tailor your preparation to, those criteria too!