A quadrupole is a type of mass analyzer used in mass spectrometry that utilizes electric fields to selectively filter or transmit ions based on their mass-to-charge ratio (m/z). It consists of four parallel rods, arranged in a square configuration, with opposing rods connected electrically. These rods create a dynamic electric field that allows only ions of a specific m/z to pass through to the detector.