My nail is currently infected and my finger is throbbing strongly to the rhythm of my heart. When I position the camera flash under my thumb, my heartbeat and blood flow can be seen through the change in light. This is probably how heart rate measurement also works.