For the Student: At a minimum before starting independent research should take introduction to economics, a related field course(s) to their proposed research topic (e.g. development economics, environmental economic, or labor economics) and an econometrics class. The last class is the most important for data work. You should be able to open a data set, find the descriptive stats for a variable, run basic regressions (e.g. OLS, probits, ect.), and interpret coefficients.
If you do not have the course work go take it first. One exception is if you have a topic of interest and and the econometrics or stats class you are enrolled in has a related research project. In this case you might approach a professor you are interested in working with to see if you can get advice about how set up your class project to be the basis for your future research project. I strongly suggest you ask the teacher of the econometrics/stats class if this is OK to do before approaching another professor for help.
For the Professor:
Professors supervising research have already done all of the steps themselves, but must learn how to teach them. If a student approaches you is enrolled in a stats class, giving them help like you would any other student in your class seems fair. I would also suggest you check in with your colleague before doing so. The only additional preparation I would suggest for professors is to talk to colleagues about independent studies and theses, so you can better understand your universities rules.