It uses the _get_cron_array() function to retrieve all registered & scheduled actions. Another useful function is wp_get_schedules(). The third way is calling the underlying data for _get_cron_array() directly, by calling get_option( 'cron' ); - it's still better to use the default API functions from WP core.

If you want to know if you're currently inside a Cron Job, then you can check defined( 'DOING_CRON' ) AND DOING_CRON.