A contact high is typically what is referred to when a person who is not smoking an illegal substance is near others who are and becomes high from inhaling the smoke that is in the air. It is, afterall, the inhaling of the drug that causes the high. Smoke does not differntiate between the person actually doing the smoking and those who are nearby not participating. Additionally, the term is now being used to describe other non illegal drug use situations.
If you take a sub-lingual medication and then kiss someone they will be absorbing that medication through their tongue just as you had and result in a contact high. Or the use of larger inhalers used for vasodialation, as in asthma, or the like, can also cause others in the room to have their lungs affected as a result. Not all of the drug, in any of these circumstances, is completely absorbed by the intended user and therefore can and often does affect a bystander.