They would need to complete and pass whatever examination is required for the Masters degree, this would usually include a thesis or dissertation and viva. Ordinarily if the student decides not to transfer to the PhD (or the department decides they're not good enough), then they would be entered for the Masters qualification.