How Can I Build A Credit History?

I don’t really have much of a credit history, I have never worked before and my parents have always paid for everything. Now that I am living away from home at college, I want to start building a credit history so that by the time I graduate it will be easier to do things like rent an apartment and buy a car, which I will definitely need to do. What is the best way to build a credit history? I am thinking about getting a part time job and getting a student credit card. That way I can pay for things with the credit card and pay it off each month with the money I earn from my job. Is this a good approach?