Ain't is a contraction for am not, is not, are not, has not, and have not.
It is not grammatically correct English. Native speakers use it, some people use it rather a lot but it is informal/colloquial English.
In the wrong context it can give the impression of either laziness. or being poorly educated. It is for this reason that I am highly reluctant to recommend to non-native speakers that it is an appropriate word to use.
But that seems like a bit of a double standard, that native speakers can use it and non-native speakers can't. But for a learner it can be very hard to judge the correct context, so with this in mind my advice would be not to use it until your English is of a high level.
But definitely never use it in formal settings, and never use it in writing unless you want to specifically imitate colloquial speech.