Of course it depends on what the habit it is and why you have it but one simple approach involves the use of rubber bands. You place the band around your wrist and when you are tempted to do something you shouldn't do you pull the band back and snap it on your wrist. Don't try to kill yourself just use enough pressure to remind yourself. Many people find this technique works well and fast.