Drupal 7 - Load taxonomy tree

// Retrieve vocabulary based on its machine name
$vocabulary = taxonomy_vocabulary_machine_name_load('tags');

// Load whole taxonomies related to given vocabulary
$tree = taxonomy_get_tree($vocabulary->vid);