<p>I'm assuming you're using the scikit-learn random forest model, since it has that <code>feature_importances_</code> attribute. Though you might see similar results by checking the correlation between features and your target variable, <code>feature_importances_</code> uses a more sophisticated approach. From the <a href="https://scikit-learn.org/stable/modules/ensemble.html#feature-importance-evaluation" rel="nofollow noreferrer">user guide</a>:</p>

<blockquote>
  <p>The relative rank (i.e. depth) of a feature used as a decision node in
  a tree can be used to assess the relative importance of that feature
  with respect to the predictability of the target variable. Features
  used at the top of the tree contribute to the final prediction
  decision of a larger fraction of the input samples. The expected
  fraction of the samples they contribute to can thus be used as an
  estimate of the relative importance of the features. In scikit-learn,
  the fraction of samples a feature contributes to is combined with the
  decrease in impurity from splitting them to create a normalized
  estimate of the predictive power of that feature.</p>
  
  <p>By averaging the estimates of predictive ability over several
  randomized trees one can reduce the variance of such an estimate and
  use it for feature selection. This is known as the mean decrease in
  impurity, or MDI. Refer to [L2014] for more information on MDI and
  feature importance evaluation with Random Forests.</p>
</blockquote>

<p>The reference there was to <em><a href="https://arxiv.org/pdf/1407.7502.pdf" rel="nofollow noreferrer">Understanding Random Forests: From Theory to Practice</a></em>. Of specific interest to you will be Chapter 6 (p. 135), "Understanding Variable Importances".</p>
Random Forest Feature Importances vs Correlation Matrix
<p>I want to see the correlation between variables. So first, i used Correlation Matrix. It showed me the correlation between all variables. Then i create my <code>random forest regressor</code> model. In an article i found that it has function of <code>feature_importances_</code>. It tells the correlation between the independent variables and the dependent variable. So i tried it, then i saw that it shows the same correlation values with the values of Correlation Matrix. My question is, then what is the difference between Correlation Matrix and Random Forest Feature Importance?</p>