Terroir refers to the combination of natural factors associated with any particular vineyard. These factors include such things as soil, underlying rock, altitude, slope of hill or terrain, orientation toward the sun, and microclimate (typical rain, winds, humidity, temperature variations, etc.) No two vineyards have the exact same terroir, although any difference in the resulting wine may be virtually undetectable.
Vineyards are often on hillsides and on soil of marginal value to other plants. A common saying is that "the worse the soil, the better the wine." Planting on hillsides, especially those facing south, is most often in an attempt to maximize the amount of sunlight that falls on the vineyard. For this reason some of the best wines come from vineyards planted on quite steep hills, conditions which would make most other agricultural products uneconomic. The stereotypical vineyard site for wine grapes (in the Northern hemisphere) is a hillside in a dry climate with a southern exposure, good drainage to reduce unnecessary water uptake, and balanced pruning to force the vine to put more of its energy into the fruit, rather than foliage.