rauchen
to smoke
To inhale and exhale the smoke from tobacco or other substances, usually in the form of cigarettes, cigars, or pipes.
Er hat vor einem Jahr aufgehört zu rauchen.
He stopped smoking a year ago.

to smoke
Loading your saved state.
to smoke
To inhale and exhale the smoke from tobacco or other substances, usually in the form of cigarettes, cigars, or pipes.
Er hat vor einem Jahr aufgehört zu rauchen.
He stopped smoking a year ago.

The verb 'rauchen' (to smoke) is directly connected to the noun 'der Rauch' (smoke). Anything that produces smoke or has to do with smoke can be described with this verb.
Das Lagerfeuer rauchte stark, weil das Holz nass war.
The campfire smoked heavily because the wood was wet.
You can use 'rauchen' (to smoke) with an accusative object to say what someone smokes. But you can also use it without an object to describe the general habit.
Er raucht eine Zigarre nach dem Abendessen.
He smokes a cigar after dinner.
If the subject of the sentence is not a person but an object (e.g., a chimney, a fire, an engine), 'rauchen' (to smoke) almost always means that this object is giving off smoke.
Nach dem Unfall rauchte der Motor des Autos.
After the accident, the car's engine was smoking.
The expression 'jemandem raucht der Kopf' (someone's head is smoking) uses a dative construction. The person who is exerting themselves is in the dative.
Nach sechs Stunden intensiver Arbeit rauchte mir der Kopf.
After six hours of intense work, my head was smoking.
to think
'nachdenken' and 'rauchen' are similar only in a special colloquial expression. You use 'nachdenken' directly when someone is dealing with a question or a problem. With 'der Kopf raucht' (one's head is smoking), you mean figuratively that someone is thinking very hard or becoming mentally tired. The normal verb 'rauchen' otherwise has to do with smoke and is not meant here. If you want to say neutrally and clearly what someone is doing, 'nachdenken' is correct. 'Der Kopf raucht' fits better in casual conversation when thinking is strenuous.

Nach drei Stunden Mathe raucht ihr der Kopf.
After three hours of math, her head is smoking.
Vor dem Termin hat er lange über seine Antwort nachgedacht.
Before the appointment, he thought about his answer for a long time.