The subject is a confusing one because of the rather inexact use of terms in most post-Roman cultures.
Especially large or poisonous snakes are commonly called serpents, and biblical tradition calls the shape Satan assumed to tempt Eve a serpent. But technically speaking, all snakes can be called serpents, from the Latin derpere, meaning to creep.
However, scientists use the word snake to mean any member of the taxon Serpentes, generally considered a suborder of the order Squamata, although Serpentes actually sits closest to monitor lizards in the evolutionary tree of lizards. (Snakes, then, are really just one legless subset of lizards.)
While the word serpent may be used as a synonym for any snake, a viper is any member of the solenoglyph snakes, including rattlesnakes, adders, water moccasins, and copperheads.
Generally, systematic herpetologists place vipers in two families. They are the Viperidae, or Old World vipers (adders, puff adders, etc.), which lack heat sensory pits on the face, and the Crotalidae (pit vipers), found in southeastern Asia and the Americas, which do have sensory pits on the face, including the rattlesnakes, bushmasters, fer-de-lance, cottonmouths, and tree vipers.