I cleaned rental cars for a couple years when I was in college.
If the smoker was courteous enough to leave the windows open while smoking, then a good vacuuming and scrubbing of all surfaces (including windows.. you'd be amazed and how much smell the grime on the inside of the windows holds) would usually kill most of the smell.
But if they left the windows up, it was almost impossible to completely remove the smell. Air freshener works for a couple hours, but since the smoke gets into the cabin air filters, it's only temporary.
A seriously smoked up car - especially if it was marijuana smoke - about the only thing we could do is pull it out of service, bathe it in febreeze, and park it in the sun with the windows open for a couple days.