Let me start off by saying, that I know that cutting hair and nails on shabbos is prohibited. My question is, is it a biblical or rabbinical prohibition. In my mind it seems rabbinic because when you look at the melacha of gozez (shearing) and look at what purpose they did it in the mishkan, they sheared wool and other materials off livestock to make clothing curtains and other items. Regarding cutting hair and nails however you usually throw them in the garbage. So wouldn't cutting hair and nails be a מלאכה שאן צריכה לגופה?
The Biur Halacha (340:1 ד"ה וחייב) addresses this question at significant length. Here is an abridged synopsis:
Rivash (394) explains that cutting hair and nails in order to enhance one's appearance is מלאכה הצריכה לגופה similar to the shearing of hair on the Oros Ailim that was performed to enhance the appearance of the ram skins. This is also the opinion of the Rivash's rebbe, the Ran, the Rosh, Rabenu Chananel and others as stated in the Biur Halacha.
(However, Gra (ibid) uses this halacha as a proof for the Rambam's opinion that מלאכה שאן צריכה לגופה is chayyav, but the other Rishonim who hold that it is patur must be following the Rivash's approach.)
Have a look at eh Mishna in Shabbos 10:6
הנוטל ציפורניו זו בזו או בשיניו, וכן שיערו, וכן שפמו, וכן זקנו, וכן הגודלת, וכן הכוחלת, וכן הפוקסת--רבי אליעזר מחייב חטאת, וחכמים אומרים משום שבות. התולש מעציץ נקוב, חייב; ושאינו נקוב, פטור. רבי שמעון פוטר בזה ובזה
The Bartenura says: When Chachamim say that you are Patur from a Korban, it's only when cutting the hair & nails by hand. But if you use an instrument then Chachamimi agree with רבי אליעזר that you are חייב.
The עיקר תוי"ט sources this as coming from the Gemara - but adds that Tosafot their say that this goes according to the opinion of R' Yehuda that מלאכה שאינה צריכה לגופה חייב.
The Bartenura continues that cutting a friend's hair - even by hand - is חייב.
The עיקר תוי"ט complains that he didn't explain himself, and adds that it seems from the Gemara that that one can cut - by hand - one's own hair better than one can cut a friend's hair.
From this I understand that the problem of cutting hair is not so much (or "not only") what you will do with the hair, but there is a מלאכה to trim and make something look nice.
This would fit in nicely with the Rivash mentioned in Yoni's answer.
Mishna Berura 340:1:2 says that cutting hair with a tool on Shabbos is a biblical prohibition.