An accent is the way a person speaks.
Some people pronounce words differently. Often, in different countries that speak the same language the same words are pronounced in a different way. Usually they can be understood, but to listeners notice they sound different. This may, or may not, be a difficulty.
Sometimes, people will talk about someone's accent. They might say that the person has a German accent, or an Australian accent. An accent is the way you say the words. If you notice someone has (for example) a British accent, you can understand them (you know what they are saying), but also know they came from Britain.
The way a person says words usually comes from where the person was a child (where they "grew up", or their "home town") and the other people where the person lives. People learn how to say words and sentences and so they sound the same people near them when they speak.[1]
People speaking the same language do have different accents. Even people in the same country may have different accents. Sometimes people can tell what city someone lived in when they were a child by the way that person speaks. One example is a New York City accent. They might say "bwoll" (/ˌbwɔːl/) instead of ball (normally /ˌbɑːl/ in America), like used in sports and games; or they might say "hwot dwog" (/ˌhwɔːt dwɔːɡ/) instead of hot dog (normally /ˌhɑːt dɑːɡ/ or /ˌhɑːt dɔːɡ/ in that country). It sounds different, but people still know they mean "ball" or "hot dog" when they're talking.
When first trying to learn a new language, often a person will still have the old accent from their first language. That often allows other people to guess which country or place that person lived in before.
If someone can learn another language well enough, someone may not have the old accent anymore and may get a new accent in the new language. If someone studied German in Austria, for example, people in Germany may think that person was Austrian.
Sometimes it can be confusing for people learning a language if there are more than one common accent. Perhaps it is better to learn the language with one accent so you can be less confused, and when you're good enough at the language, you can start to understand the different accents which people from different areas may have.