Any good ways on how to quit smoking?

I need good ways to help me quit smoking. Without buying useless crap. Cause i don’t have the money do buy it. I really need to know cause im sighing up for the US Army. And i know for sure that they are gonna make me run for miles. And i don’t wanna be the one on the ground catching my breath every now and then.