a legitmate word meaning to pluck, or pull, and other non slang variations, but the slang variant was originally used to indicate the stage of a drug induced high, usually immediately following dosing, that indicates the climax of the high and the shift from sobriety into being extreme intoxication. Users were left alone when they "tweak," or are "tweaking out" until the initial strong effects of the drug wore off a little and they were more coherent.
The term has come to loosely refer to being high on speed, as well as unfortunately children who have been exposed to meth amphetamines in utero, parodied on shows including South Park.