summary: keep trying, keep listening.
I think this is actually a fairly interesting question, to which there is both a simple, and a complicated answer.
The complicated answer is that to fully understand how different accents work, you need to study linguistics, and phoenetics. Many rules for speaking with a certain accent can depend on relatively simple things like changing the pronunciation of basic vowel or consonant sounds. For example
water, when pronounced with a New Zealand accent sounds more like
warder, and converting "t" to "d" can be effective at approximating this accent for many words.
However relatively complex things like the structure of individual syllables in the words you are pronouncing can also have an effect. For example with a New Zealand accent, neither of the "t" sounds in
trait would be converted to a "d". The first "t" would be pronounced as in British English, and the second "t" would be cut off so it would sound something like
trai' when pronounced alone.
Also changes depend not only on the accent you are trying to approximate but also on differing accepted pronunciations of specific words, such as the difference between American and British pronunciations of
tomato, which can be said as "tom-aa-to" or "tom-ay-to", and is mostly specific to this word.
The simple answer is that the best way to learn to use different accents is to try, while listening to yourself. If you can hear that you are pronouncing words inconsistently, then you are already half-way to learning to change your accent consistently :). Keep trying to read in different accents out loud, try recording yourself and playing it back, and compare with native accents whenever possible.
As Jeremy and esperisto say, the most important thing is to gain an intuitive understanding of what particular accents sound like when spoken natively. And as it happens, people are pretty good at this. When moving to another country, I've found it's actually pretty hard to stop your own accent from changing to imitate the locals.