You're probably using Proportional Editing. This mode allows the user to make changes to vertices (or other selectables) within a given region, based on how close those vertices (or other selectables) are to the actual selection.
From the Manual:
Proportional Edit is a way of transforming selected elements (such as vertices) while having that transformation affect other nearby elements. For example, having the movement of a single vertex cause the movement of unselected vertices within a given range. Unselected vertices that are closer to the selected vertex will move more than those farther from it (i.e. they will move proportionally relative to the location of the selected element). Since proportional editing affects the nearby geometry, it is very useful when you need to smoothly deform the surface of a dense mesh.
This can be (accidentally) turned on by pressing O. It can be turned off the same way.
GUI controls in Blender 2.8x (proportional editing enabled):

GUI controls in Blender 2.7x:

(The highlighted button toggles the mode on and off)