Officially it is any wine with a residual sugar of at least 45g/l.
Medium sweet wines legally must have between 12 and 45g/l of residual sugar, according to the EU.
However, perceptions of sweetness can vary from wine to another. Acidity, alcohol and many other factors can alter our perception of how sweet a wine really is. For example a dry Chardonnay (under 2g/l RS) may have a feeling of sweetness due to the ripeness of fruit, the use of oak and high alcohol. However, a German Riesling may taste drier than it really is thanks to bracing acidity which balances it out.