Try something similar to:
$nids = array();
foreach($content['YOUR_FIELD_NAME']['#items'] as $key => $val)
{
$nids[] = $val['target_id'];
}
// the referenced nodes ids are now stored inside "$nids" array.
// You can do whatever you need to do from there.
// below I try to load the node object of each nid.
$nodes = node_load_multiple($nids);
Hope this helps... Muhammad.