"Ain't" is an informal term. It's primarily used in situations where formalities aren't important, and it's used in more of a casual or friendly setting. It's also widely disapproved as being a nonstandard form of am not/has not/are not/is not/do not. It's highly stigmatized, and often seen as being "slang" terminology. However, it is widely used in American speech, whether it be included in the native dialect of an individual, or to place emphasis on a certain situation/person/etc.
"I ain't happy." = "I am not happy."
"She ain't did it yet." = "She has not done it yet."
"No, I ain't." = "No, I am not."
Although highly stigmatized, as mentioned before, "ain't" is commonly found in a few dialects within the United States; those that are regional and those that are cultural.
Destiny, thank you for your explanation of how some cultural and regional groups within the United States do say "ain't" somewhat often when they are in casual conversations with each other. It can vary depending on your family, neighborhood, and circle of friends. It was definitely rare to hear "ain't" said in my school setting, family and other social groups. I would have been criticized for being "wrong" (by the adults) or sounding "artificial" (by my peers) if I used the word. I apologize if I sounded critical of people who are in communities where it is acceptable to use the word and therefore happily do so.)
For foreigners who are learning English, there is no reason for them to try to add "ain't" into their vocabulary since they may not know when or with whom it is appropriate to use this very informal way of speaking. If they move to the United States and start spending time with friends or co-workers who say "ain't", then they can observe how it is used and eventually start saying "ain't" themselves if they feel comfortable doing so.
Honestly, "ain't" is a word that you never need to use.
It is fine to know what "ain't" means so that if you hear it in a song or in a movie, you will understand it. "Ain't" is a very informal, slang way of saying "am not", "isn't (is not)", or "aren't (are not)." Most people in the United States never say "ain't" in any kind of regular conversation.
""Ain't" sets off bad grammar alarm bells. "Ain't" sounds like nails on a chalkboard to lot of people. Screeeeeech!