Cost hierarchy is a framework used in managerial accounting to categorize costs based on different levels of activities, allowing organizations to better allocate resources and manage expenses. It helps in understanding the relationship between costs and activities, facilitating more accurate budgeting and cost control.