Now, some people do not change their accent at all if they are going somewhere with a similar enough accent. For example, if I decided to move to, say, New Mexico, there are so few differences between my own accent and a New Mexican accent, that I might not even bother to change my accent--as most people probably wouldn't even notice my accent to begin with. Or, I might just naturally pick up the new pronunciations, not even noticing that I am changing my pronunciation.
There are also people that will do anything to blend in with the locals if they move somewhere, and they will try very hard to learn the new accent. Their accent will of course change the most. Whether they perfect the accent or not is based on how difficult it is, but people from where they are originally from will almost always say that they have certainly lost their old accent.