Most cyclists opt for a chest strap heart rate monitor. A chest strap heart rate monitor measures small electrical signals given when your heart constricts.
By contrast, wrist and headphone heart rate monitors usually use optical technology which shines a light into the skin and reads how much is reflected back. As your heart beats, the volume of blood flowing through your arteries changes, causing different amounts of light to return back to the sensor against your skin. The HRM then uses an algorithm to determine pulse rate.
As techy and scientific as the latter might sound, electrical technology is generally considered more accurate - sample rates are higher and the chest doesn't move around as much as the wrist, resulting in fewer fluctuations in info.