From Data Warehouse concepts point of view and Data Analytics point of view, Hierarchy is arrangement of UNIQUE ATTRIBUTES in LOGICAL ORDER. Example: TIME can have YEAR, MONTH and DAY hierarchy (or) LOCATION can have COUNTRY, STATE and CITY hirarchy.
Drill downs and Roll ups are dependent on the Hierarchy unique attributes. In TIME hierarchy we can Drill down from YEAR to MONTH, MONTH to DAY. We can also roll up from DAY to MONTH, then MONTH to YEAR.
When you connect to a data source, Tableau automatically separates date fields into hierarchies so you can easily break down the view by year, quarter, month, etc. We can observe a PLUS symbol adjacent to the field those are part of the HIERARCHY.
Tableau allows to create our own custom hierarchies. When the source data related to planned hierarchy is divided in to multiple columns, we will be forced to create our hierarchy. Example: Assume source table contains columns such as COUNTRY, STATE, CITY. After connecting with Data source using Tableau, we can see three different dimensions COUNTRY, STATE and CITY. We can create a custom hierarchy called LOCATION by selecting COUNTRY, STATE, CITY then right click, in the pop up window name the hierarchy as LOCATION. Now drag drop COUNTRY from LOCATION Hierarchy in to Data Window columns, you can observe a PLUS symbol adjacent to COUNTRY indicating HIERARCHY.