The medicine or whatever is being pushed through the IV makes it way through your blood into your lungs. when you exhale, the stuff now in the blood vessels in your lungs passes out your mouth in small amounts, so you taste it.