Abstract : Between 2007 and 2010 Virgo collected data in coincidence with the LIGO and GEO gravitational-wave (GW) detectors. These data have been searched for GWs emitted by cataclysmic phenomena in the universe, by non-axisymmetric rotating neutron stars or from a stochastic background in the frequency band of the detectors. The sensitivity of GW searches is limited by noise produced by the detector or its environment. It is therefore crucial to characterize the various noise sources in a GW detector. This paper reviews the Virgo detector noise sources, noise propagation, and conversion mechanisms which were identified in the three first Virgo observing runs. In many cases, these investigations allowed us to mitigate noise sources in the detector, or to selectively flag noise events and discard them from the data. We present examples from the joint LIGO-GEO-Virgo GW searches to show how well noise transients and narrow spectral lines have been identified and excluded from the Virgo data. We also discuss how detector characterization can improve the astrophysical reach of gravitational-wave searches.