Randomized controlled trials are the gold standard for evaluating the effects of medical interventions, primarily providing estimates of the average effect of an intervention in the overall study population. However, there may be significant differences in the effect of the same intervention across sub-populations with different characteristics, that is, treatment heterogeneity. Traditional subgroup analysis and interaction analysis tend to have low power to examine treatment heterogeneity or identify the sources of heterogeneity. With the recent development of machine learning techniques, causal forest has been proposed as a novel method to evaluate treatment heterogeneity, which can help overcome the limitations of the traditional methods. However, the application of causal forest in the evaluation of treatment heterogeneity in medicine is still in the beginning stage. In order to promote proper use of causal forest, this paper introduces its purposes, principles and implementation, interprets the examples and R codes, and highlights some attentions needed for practice.