Most people don't realize that a language's accent is a physical thing. Your throat, nose, tongue behave differently when speaking different languages. If you're French, you can't speak English while keeping the same physical arrangement of your mouth and throat than when you speak French. So if you want to speak a language with a native accent, you have to experiment with all those parameters, and find what your voice sounds like in that language. For instance, my voice is a bit deeper in English than it is in French; this is particularly noticeable with my female friends who are speak both English and French natively - their voices tend to be very noticeably higher in French.
I've been learning Japanese, and it seems that I get best pronunciation results when my throat is in an even lower, more relaxed position than English. I intend to pick up mandarin at some point and am very much looking forward to experimenting with that, as I have no experience with strongly tonal languages.
Kids get this intuitively, but adults have a much harder time with it- it has to be taught consciously. Which is why most French people, even after living in an English speaking country for many years, retain a horrible French accent. We really ought to be teaching kids from the maternelle, much like many of our European neighbors do.
That being said, one thing I just have never been able to do are regional accents in languages I already speak. I cannot for the life of me speak with a northern French accent (my family's from the south, although I grew up in Lyon so have a mostly neutral accent), or a British accent.