How to use svm/random forest for feature extraction?

hi everyone: how to use svm/random forest for feature extraction? best wishes, thank you