There are two ways wearables measure a person's heartbeat: optical pulse measurement using light and a heart rate sensor that records the heart's electrical activity.