Quitting smoking

So I'm curious cuz hubby and I aren't using protection and I'm a pack a day smoker how do u quit if u get pregnant I've heard just stopping will make u lose the baby