Driving or operating a motor vehicle under the influence (DUI) includes both driving under the influence of alcohol, as well as driving under the influence of any narcotic drug, any self-administered intoxicant or drug or substance which impairs the ability to drive/operate a motor vehicle, engine or train safely. That description also includes impairment by medications legally prescribed to you if the medication impairs your driving. Illegal substances which can be the basis for DUI include but are not limited to cocaine, marijuana, methamphetamine, phencyclidine (PCP) and methylenedioxymethamphetamine (MOMA ecstasy).
The law in Virginia includes not only driving but also operating a vehicle under the influence. A vehicle does not need to be in motion. This means that if the keys are in the ignition and you are operating any part of the vehicle (exp. the head lights, the radio, the heater, etc.) you are operating a motor vehicle and can be charged for DUI.