You can go through the below chapter to clear your thoughts about GROUPING SETS:
==>SQL Reference Data Manipulation Statements
====>Chapter: The SELECT Statement
========>GROUPING SETS OPTION
In essence its a way to aggregate data for different groups within the same query.
e.g SELECT DIST_ID , STORE_ID , PROD_ID , SUM(SALES_AMT) FROM SALES_TBL GROUP BY GROUPING SETS ((DIST_ID) , (DIST_ID , STORE_ID) , (DIST_ID m STORE_ID , PROD_ID))
The above case could also be handled using a ROLLUP( GROUP BY ROLLUP(DIST_ID , STORE_ID , PROD_ID)
In a way its UNION of data aggregated on different groups.