The OPERA neutrino oscillation experiment has been designed to prove the appearance of ντ in a nearly pure νμ beam (CNGS) produced at CERN and detected in the underground Hall C of the Gran Sasso Laboratory, 730 km away from the source. In OPERA, τ leptons resulting from the interaction of ντ are produced in target units called bricks made of nuclear emulsion films interleaved with lead plates. The OPERA target contains 150000 of such bricks, for a total mass of 1.25 kton, arranged into walls interleaved with plastic scintillator strips. The detector is split into two identical supermodules, each supermodule containing a target section followed by a magnetic spectrometer for momentum and charge measurement of penetrating particles. Real time information from the scintillators and the spectrometers provide the identification of the bricks where the neutrino interactions occurred. The candidate bricks are extracted from the walls and, after X-ray marking and an exposure to cosmic rays for alignment, their emulsion films are developed and sent to the emulsion scanning laboratories to perform the accurate scan of the event. In this paper, we review the design and construction of the detector and of its related infrastructures, and report on some technical performances of the various components. The construction of the detector started in 2003 and it was completed in Summer 2008. The experiment is presently in the data taking phase. The whole sequence of operations has proven to be successful, from triggering to brick selection, development, scanning and event analysis.