How is a Masters different from the first two years of a PhD in the same field?
There are two different types of Masters - taught masters and research masters.

In England, a research masters allows you to work, on rotation, around 3 labs in the year, and you can pick and choose from different sub-fields. This is hugely beneficial because it exposes you to different sub-fields, but more importantly because it exposes you to different work dynamics and environments, allow you to cope better in your PhD; furthermore, you'll make more contacts (which is all that matters in research - reputation and recommendations) and learn from different people. It'll give you the confidence to know, during your PhD, whether you are right or wrong.

The downside is that it takes you one more year and there is no guarantee you'll get a PhD after, and there is also the extra cost - most funding bodies do not fund a one year masters. However, if you apply for a 4-year Masters with PhD, funding options are more generous.

I can only speak for England, unsure about other countries, but the same principles apply. (my own opinion is that MRes is good if you can afford it)