It's when you manipulate someone so pervasively or convincingly that they begin to doubt their own experience. Usually it's used in relationships where there is a power imbalance and it is easy for one person in the relationship to manipulate the other.
For example, say a mother and daughter are feuding, and the mother decides to push her side by telling the daughter that she's mentally ill. She can use the advantages of age and maturity to basically run psychological warfare on her child - like every time the girl does any typical teenager thing or gets a little emotional, the mother will claim that's a sign of mental illness, to the point where the daughter might eventually begin to start to question her own sanity.
Or think about a sexual predator to an abuse victim. They'll say things like, "You wanted it first", "You are the one who seduced me", "I didn't want to touch you like that but you were acting like such a little slut, it's all your fault", and keep piling on that shyt until the girl actually believes that she's responsible for the abuse.
Gaslighting is most common from a parent to a child, from a more manipulative spouse to the other one, or from an abuser to an abuse victim. But it can also be a boss-to-employee relationship. Cult leaders use gaslighting a ton - it's damn near the definition of what it takes to run a cult.