You define named sets in the WITH section of the query. Doing so is useful because you can reference the set by name when building the SELECT section of the query.
For example, the named set Best5Prods identifies a set of the five top-selling products in December:
WITH SET [Best5Prods] AS 'Topcount ( [Product].members, 5, ([Measures].[Sales], [Scenario].[Actual], [Year].[Dec]) )' SELECT [Best5Prods] ON AXIS(0), {[Year].[Dec]} ON AXIS(1) FROM Sample.Basic