All wines begin with ripe fruit which contains sugar. Wines that are considered sweet usually have what is called residual sugar, this means the yeast that produce the alcohol were stopped by the winemaker to leave some sugar in the wine.
A dry wine is a wine that has been fermented to the point where there is no fermentable sugar left. This means that the yeast have turned all the sugar that they can into alcohol. Any sweetness that may be left in the wine can be attributed to oak and/or un-fermentable sugars.
Often a wine can have a sweet taste, but still be considered a dry wine. The levels of acidity, tannin and aroma all affect how sweet a wine tastes. And of course, taste is very subjective. What one person may think of as sweet, another may not. In addition, people often confuse "fruity" with "sweet". Most table wines (eg. Cabernet Sauvignon, Chardonnay) are dry wines. Examples of dry wines which are often "sweetish" are Reisling and Sémillon. Examples of sweet wines are Port and Moscato.