When you learn a new language, you hope to speak it with the right accent. This doesn't always happen easily, though. I've met people living in the United States for decades and relatively fluent in the English language who speak English with a strong accent.
Why is it so difficult for some people to lose their accent when they learn a new language? The short answer is that for years and years, the muscles in their tongue, lips, jaw, and pharynx, which make sounds and words from the vocal cord vibrations, have practiced their first language. It becomes a matter of practice and willingness to produce the sounds of the new language.
The more you practice speaking, the better you get at it. If you speak clearly enough, as I've repeatedly told my students, and use the right grammar and vocabulary, your chances of being understood by others are good.