Do people with masters degrees have an advantage over undergrads in PhD admissions? The pool of applicants for a PhD program consists of people applying straight after undergrad, and also people who have done masters programs. Do students with masters degrees have an edge over undergrads in the process? Do admissions officers judge undergrads and masters students differently? If undergraduate students have taken graduate-level courses (but perhaps not as many as a masters student has), where does that put them in comparison?
It very much depends on the Country, the Field, and the Master's. 

I'm assuming, since you are asking that you are interested in Country where a Master's degree isn't an absolute requirement for a PhD in your field of interest. My field (Life-Sciences) in my country (UK) is like this. 

I would say that it very much depends on the Master's degree. As far as I can see there are three types of Master's degrees in UK Life-Sciences 


Those for people who want to learn something different to what they learnt at undergraduate. So for example, my research is in Bioinformatics, and this is not normally covered in UK undergraduate degrees. This could be an advantage if you wanted a PhD in that area.
Master's degrees that are integrated as the 4th year of an undergraduate degree, and are generally almost entirely research based. I have found the students with these often have an advantage over others as they have experience of doing real research in a real research lab. This is important because UK PhDs are generally 3 years (4 at a maximum) and you need to hit the ground running. 
General topic master's degrees for people who didn't get a good enough grade to go straight to a PhD. These might help you make the grade (i.e. if your undergrad grades were too poor there is 0 chance of a PhD, and a none zero chance after the master's), but if you have the grades to be accepted, this master's is useless to you. Worst, it might you look worse.


So in conclusion, it very much depends on the master's and why you took it.