to bullshit or lie, to tell a falsehood. originally comes from the era of snake-oil salesmen and traveling hucksters pandering cure-all ointments.
one said cure for many ailments (including constipation) was a "tobacco enema" in which the purveyor would literally blow smoke up the afflicted's rectum with a device created solely for this purpose. obviously people caught on soon enough, and figured out that tobacco enemas were embarrassing as well as useless.
as such, the phrase became the euphemism it is today for selling a line of nonsense to an otherwise naive or unsuspecting rube.
person 1: "did you know that recent studies show that rat feces are as effective as any available wrinkle cream on the market?"
person 2: "you're totally blowing smoke up my ass"
To purposely tell someone what they want to hear but also giving yourself excuses and reassuring someone that what is happening is neither their or your fault.
Teacher 1: Jack told me that he can't take the test tomorrow because he has been really busy even though according to him he thought I did a great job explaining it to him. I think I'm gonna give him an extra week.
Teacher2: Oh please, he's just blowing smoke up your ass