I am in the USA, I entered with a tourist visa, which allows me to stay 90 days in the country. But I also have a student visa that allows me to stay longer (studying). Is it possible to go to Canada for a few days with my US tourist visa and re-enter the USA with my US student visa?
You will need a Canadian visa to visit Canada (unless you have a passport that is visa-exempt to Canada, in which case you will need an eTA if arriving in Canada by air).
When you return to the US, yes, you can enter on your US student visa if you are within 30 days of the start of your student program.