how does this specific line of code work?
#define HRM_FLAG_MASK_HR_VALUE_16BIT (0x01 << 0) /**< Heart Rate Value Format bit. */
It is just standard 'C' syntax - nothing specific to ARM or microcontrollers - so you should simply look it up in your 'C' textbook.
Here are some 'C' reference & learning resources - including a free online textbook:
blog.antronics.co.uk/.../