c. 1300, "the light, elastic outer bark of a species of oak tree native to Iberia and North Africa, used for many purposes," from Spanish alcorque "cork sole," probably from earlier Spanish corcho, from Latin quercus "oak" (see Quercus) or cortex (genitive corticis) "bark" (see corium).
In reference to the tree itself, mid-15c. From late 14c. as "cork-soled shoe." As "cork float for a fishing line," mid-15c. Meaning "cylindrical cork stopper or bung for a bottle, etc.," 1520s. As an adjective, "made of cork," 1716.
"cylinder of wood or metal with a spiral ridge round it; hole in which a screw turns," c. 1400, scrue, from Old Frenchescröe, escroue "nut, cylindrical socket, screwhole," of uncertain etymology; not found in other Romanic languages. Perhaps via Gallo-Roman *scroba or West Germanic *scruva from Vulgar Latin scrobis "screw-head groove," in classical Latin "ditch, trench," also "vagina" (Diez, though OED finds this "phonologically impossible").
Kluge, Watkins and others trace it to Latin scrofa "breeding sow," perhaps based on the shape of a pig's penis (compare Portuguese porca, Spanish perca "a female screw," from Latin porca "sow"). Latin scrofa is literally "digger, rooter," from PIE root *sker- (1) "to cut." A group of apparently cognate Germanic words (Middle Low German, Middle Dutch schruve, Dutch schroef, German Schraube, Swedish skrufva "screw") are said to be French loan-words.
Sense of "means of pressure or coercion" is from 1640s, probably in reference to instruments of torture (such as thumbscrews). Meaning "prison guard, warden" is 1812 in underworld slang, originally in reference to the key they carried (screw as slang for "key" attested from 1795). Slang meaning "an act of copulation" is recorded from 1929 (meaning "a prostitute" is attested from 1725). To have a screw loose "have a dangerous (usually mental) weakness" is recorded from 1810.