It's easy tho. If you're a religious person and believe gambling is a sin you must stay away and never come back to gamble world again as you might get addicted again if you touch gambling. However, it's really hard for those who have missed much money from gamble to quit probably they will play again to recover the losses which is a wrong idea to do.
THis is harder than we thought, of course advices and religious beliefs is a big help but how about the person who got succumb to gambling? We've seen a lot of them and they're life is broke. Discipline to our inner self and measurement of balance of what is too much is important. Psychiatric approach and rehabilitation can help too. Inspiration and belief, friends and family can help you.
Gambling is fun when you are enjoying it and casually playing. But making it as a way of living is another story.