This question is also very common on interviews, but it is also essential part of Data Warehouse design.
In star schema dimensions that reflect a hierarchy are flattened into a single table.
Good example when to use snowflake schema is when we have Company with many types of products. Some of the products will have few attributes some other products will have a lot of attributes. Best practice here is to create main dimension for products that will contain common attributes like Name, Price, Product Number etc. and then to create additional sub dimensions for each distinct product like Groceries Dimension, Hardware Dimension, Books Dimension etc.
The sub dimensions must contain a foreign key of the main Product dimension table.