It depends on the university and the program.
In the US, most PhD granting institutions have pre-requisites for getting your PhD. This may include coursework and will also require research.
For research, one could argue that if you did research in the course of your Master's degree then you would have a time advantage in that you may be able to hit the ground running and engage in publish-able research more quickly.
In institutions that require coursework, the amount of coursework that overlaps with a Master's program can vary. Often, even if you've taken similar coursework in another university, you would still need to fulfill the course requirements in the department where you're going for your PhD. For programs that offer a combined Master's/PhD program, the courses for getting your PhD may be covered under the requirements for getting a Master's, so by already having a Master's degree you may only be shaving off a few of your requirements.
Last, at least in Computer Science, a Master's degree and a PhD are fundamentally different in what they're trying to educate you for. A Master's degree is more like an advanced bachelor's degree where you're taking additional courses and gaining extra skills. A PhD is for research. Given that fundamental difference, it's difficult to say how much would transfer over and again, it would really depend on the university and the program's expectations of what you should have when you enter and what you requirements you need to fulfill once you get there.