Your stipend is usually tax free (what you get paid for doing a phd from reaserch council). Any other work (eg bar or shop work) is taxed. However, if you are a full time student you will probably be unlikely to reach the first tax limit (£5000 ish), and can claim all of that tax back (including I beleive tax on interest on bank accounts). Additonally, your funding body probably limits the amount of extra work you can do, so again it seems unlikely that you would go over the min amount.
So in effect, for tax purposes, it is like you were never earning your stipend. It doesnt count towards your tax bill, so you get 5000 on top of that tax free.
If you are self funded, then I guess you would pay tax the same as every non student. Thats how i understand it anyway.