What does heart rate monitor do & how does it work on smart watch?

What does heart rate monitor do & how does it work on smart watch?