Some people say to ride them like a wave. Some people fight their way through.
If you would look at a craving from an outside persons point of view, you can remove yourself from the middle of the storm and learn what created and drove it.
This understanding often allows you to simply bypass this bump the next time it appears. "Oh yeah, I've dealt with this trigger before. Next?"
Ask yourself some questions when you gat a crave.
What made me think of smoking right now?
Was it the task I was doing?
Was it the reward after the task I was expecting?
Was it an emotion I've tied to smoking?
As you pinpoint the causes, it becomes easier and easier to build your non smoking experiences into a stronger quit.
Yes, I realize many are instructed try to pinpoint their triggers/reasons for smoking or wanting to smoke before they quit but, you'll find you need to continue learning after you've quit until you are comfortable and have let smoking go.