Of course, there are a number of complex algorithms calculating on the backend, but the final result is a real approximation of your current heart rate within a very acceptable margin of error, compared to your everyday blood pressure and heart rate monitor.
Not that the EMT's iPhones will replace their medical devices, but it is certainly helpful for quick checkups. Not in the gym if your cardio machine doesn't have this function, though, since the app serves best results at rest and in a well-lit environment.
Cardiio takes advantage of the blood vessels expanding with every heart pump, which in turn diminishes the light reflectance ratio off your face. It sports a very polished interface, and is available to try out in the App Store right now for $4.99 of your hard-earned cash.