The word "Arigato" is not impolite, but it is informal, and using it in the wrong social context in Japan can be seen as slightly disrespectful or overly familiar. Japanese culture places a high value on "Keigo" (honorific speech), and the level of politeness you use depends on your relationship with the person you are speaking to. "Arigato" is perfectly appropriate for friends, family, or people younger than you. However, when speaking to a stranger, a teacher, a boss, or even a service worker (like a waiter or hotel clerk), you should use the more formal "Arigato Gozaimasu." If you are referring to something that happened in the past, use the past tense "Arigato Gozaimashita." Using just "Arigato" in a formal setting is roughly equivalent to saying "Thanks, buddy" to a CEO. As a tourist, the Japanese generally appreciate any effort to speak the language and will be forgiving of mistakes, but consistently adding "Gozaimasu" ensures that you are showing the proper level of respect and avoids any risk of appearing "too casual" in a culture that values social distance and etiquette.