Praise be to Allaah.
As the brother has mentioned, smoking is haraam because of the general evidence that indicates that it is haraam. There is no specific text from the Messenger SAWS (peace and blessings of Allaah be upon him), because smoking only emerged recently, but the principles of sharee’ah are general in application, and some indications in some reports indicate that it is haraam. If a smoker sits next to you and wants to smoke, then advise him gently and kindly. Tell him, “My brother, this is haraam, and it is not permissible for you.”
I think that if you advise him kindly and gently, he will refrain from smoking, as we and others have found out by experience. If he does not refrain from smoking, then you have to leave him, because Allaah says (interpretation of the meaning):
“And it has already been revealed to you in the Book (this Qur’aan) that when you hear the Verses of Allaah being denied and mocked at, then sit not with them, until they engage in a talk other than that; (but if you stayed with them) certainly in that case you would be like them…” [al-Nisa’ 4:140]But this is when it is in a public place. If it is in the workplace and you advise him but he does not refrain, then there is no sin on you, because this is the matter of necessity and you could not get away from him.