Hi
Health data (including heart rate data) can be exported from the Health app on your iPhone in the form of XML files, which are perhaps most useful when importing and exporting data between apps (a health record received as an XML file can be imported into the Health app, for example).
You may find it more convenient to use a third-party app to access, analyse and export Health data to a computer in a more user-friendly format.
For example:
QS Access
Check the descriptions and support resources for third-party apps for details of any supported data import / export and analysis features.
Other third-party apps for iPhone also offer analysis of heart rate data.