An ophiolite is a slice of oceanic lithosphere — mantle peridotite through crustal gabbro, sheeted dikes, pillow basalt and its pelagic sediment cap — that has been tectonically emplaced (obducted) onto continental or arc crust rather than being subducted, so it now sits exposed on land as a coherent, dismembered or partly-dismembered slab.
Formation
Ophiolites form at a spreading centre exactly as normal oceanic crust does (see Question 10-type oceanic-crust genesis), but are then obducted — thrust up and over the edge of a continental margin or arc — during closure of the ocean/back-arc basin that hosted them, most commonly where a buoyant continental or arc block enters a subduction zone and jams it (the dense oceanic lithosphere cannot itself subduct past that point, so a slice is scraped off and pushed onto the overriding plate instead of following the rest of the slab down). Classic settings are collision of a continental margin with an intra-oceanic arc (Newfoundland's Bay of Islands ophiolite) or closure of a marginal/back-arc basin (Oman's Semail ophiolite, formed above a nascent subduction zone and obducted onto the Arabian margin).
Internal stratigraphy
Mantle tectonite Depleted, deformed harzburgite (residual after basaltic melt extraction), commonly serpentinized; forms the structural base of the ophiolite sequence.
Petrologic Moho The boundary between residual mantle tectonite below and igneous cumulates crystallized from ponded melt above — distinct from (and typically a few hundred metres to a kilometre above) the seismic Moho as originally defined in the source ocean basin.
Ultramafic–mafic cumulates Layered dunite, pyroxenite and cumulate gabbro crystallized from melt pooled at the base of the crustal magma chamber.
Isotropic (massive) gabbro Coarser, non-layered gabbro crystallized higher in the magma chamber.
Sheeted dike complex Near-vertical basaltic dikes, each intruded and split by the next, that fed the overlying lava flows — the frozen magma-supply conduits of the spreading axis.
Pillow basalt Extrusive lava quenched by seawater at the ridge axis into characteristic pillow structures.
Pelagic sediment cap Deep-sea chert/limestone/mudstone that slowly accumulated on the ridge flank before obduction.