Ain't is a contraction for
am not, is not, are not, have not, has not.
Most grammar teachers will say NEVER use it. The fact is, many people do use it, mostly in informal contexts. I would not use it in formal situations. You will find it in books, such by Charles Dickens and Mark Twain, to represent certain native dialects.
It is also used in several fixed expressions or idioms:
"If it ain't broke, don't fix it." (If something is not broken, don't try to fix it. Or: If something is working well, don't try to change/adjust/fix it.)
"You ain't seen nothing yet." (You haven't seen anything yet, compared to what I willl show you now/later.)