Try this,
Load joomla frame work to your page with following codes.
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );//this is when we are in the root
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$user = JFactory :: getUser();//if you want to get current users details then empty params other wise pass like JFactory::getUser($user_id);
echo "<pre/>";
print_r($user)//This resulted array have the user group of the user.
Hope its help you..