How do I quit an occasional smoking habit?

I have been smoking cigarettes in social situations or when I’ve been stressed since I was 15 years old, now 21. On average I probably smoke two or three packs of cigarettes every six months. I love to smoke, and it helps me de-stress so much listening to music and having a cigarette in the car on the way home from school. Everybody knows they are terrible for you, and they cause an array of cancers. How do I stop doing this? How did you quit smoking?