A DUI and DWI are essentially the same thing, but they have different abbreviations. Why? One stands for driving under the influence, while the other stands for driving while intoxicated. Sometimes, DWI stands for driving while impaired, which might be used if someone was using drugs instead of alcohol, for instance.
Between states, the terms may have different meanings, but on the whole, it usually means that someone was driving a vehicle while too impaired to do so safely. It's a serious offense that threatens the lives of others as well as the driver of the vehicle.
DUIs and DWIs don't only refer to the use of alcohol. Sometimes abbreviated DUID, driving under the influence of drugs falls under the same umbrella term. Interestingly, it's not only recreational drugs and alcohol that could land you with a DUI or DWI. Anything that impairs your ability to drive safely could result in charges.
Another acronym to know is OWI or OUI. These stand for operating while intoxicated (or impaired) and operating under the influence. These terms are sometimes used to refer to driving vehicles other than cars or trucks, like boats or planes. Drivers inside vehicles, even if those vehicles aren't running, run the risk of getting charged if they're intoxicated.
Keep in mind that an officer has to have a reason for pulling you over or investigating you before he or she can have the right to test your blood alcohol concentration (BAC) or to arrest you for a DUI or DWI. If you are stopped and arrested without cause, you can use that to fight back against the charges.
Source: Verywell Mind, "What Is the Difference Between DUI and DWI?," Buddy T, accessed June 08, 2018