Builders mate is right, you don't have to give a reason why you're leaving.
Something like:
Dear
I have been succesful in securing a role with (company name). This new role is, I feel the next step in my career and offers me new challenges which I am keen to take.
Please accept this letter/note/e-mail as my formal resignation as of todays date.
I would like to thank (current companies name) for the experience I haved gained whilst working here and wish you all the best for the future
Kind Regards
That's (or something similar is concise and to the point. The HR department should then work out what monies you're owed, holiday pay etc and let you know what to expect. You will have to pay tax however you receive it, sorry it's the law!
As regards things that have led to you leaving, they may carry out some kind of exit interview where you can discuss that. It usually happens on your last day and could be over the phone. Try and avoid being negative and refer to things that you didn't agree with as things that sometimes left you feeling a frustrated?
Ultimately use the positive spin that you are furthering your career though because if you couldn't change things whilst you where there, all you can do is make them aware of them and it's for them to take on board and act on it.