Custom Fields can be designated as "filter" fields (see Custom Fields). Those fields will appear in the Filter Tree under the "Custom Fields" node. The top 1000 unique values in any given filterable custom field are added to the custom field filters. Note that if the values in a custom field change, you'll need to go to Matter -> Refresh Environment to see the change reflected in the filter tree.
Custom Fields with more than 1000 unique values in them are not good candidates for filtering.