Sanity is the opposite of insanity. When you have sanity, you're mentally healthy and not acting crazy.
Sanity is a word for having a healthy state of mind — people with sanity don't have any loose marbles. Outside of mental hospitals, people often use this word in an exaggerated way when they've had a stressful, difficult day, shouting "I'm losing my sanity!" But if you actually lost your sanity, you'd need some serious medical attention. Besides, it usually takes more than one bad day to push someone over the edge.