The :: as mentioned is the scope resolution operator, it allows access to static, constant, and overridden properties. So, in Joomla's case and your question it's accessing a class static method called '_'.
The underscore '_' is actually the name of the method.
In Joomla you will find lots of classes implement underscore methods, e.g. the default text translation utility:
echo JText::_('COM_MYCOMPONENT_SORT_BTN_LABEL'); // This is the most commonly used one.
Only a few though still use static functions.
JHTML is an example where
[JHTML::_] acts like a class loader, loading helper file based on the first parameter passed in as the
echo JHtml::_('behavior.tooltip'); echo JHtml::_('behavior.formvalidation'); echo JHtml::_('sliders.panel', JText::_($fieldset->label), $fieldset->name); echo JHtml::_('link', JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame'));
JLanguage is a Joomla class with an underscore method that you may see used around the place but unlike
[JHTML] it's not called statically. e.g.
$lang = JLanguage::getInstance($toUser->getParam('admin_language', $default_language), $debug); $lang->load('com_messages', JPATH_ADMINISTRATOR); $subject = sprintf ($lang->_('COM_MESSAGES_NEW_MESSAGE_ARRIVED'), $sitename);