I recently decided that I don't practice in a way that benefits me at all, so I wonder what should I practice? Should I do scales? How long should I practice a day?
practice as much as you feel comfortable, for me that's around 3 hours a day... obviously not everybody is that crazy, but the one thing that has benifited me most is scales and modes... learn the modes, learn the scales, play them every day, without exception. and if you can, learn them in thirds too, it's a great excersice. i promise it's hard, and boring, but it helps ALOT
A good exercise I use is, I play E|-1-2-3-4-| and just keep moving it up and down the strings, and fretboard. so it would look like this.


Just play it as fast as you can, and time yourself, i didn't draw up the whole tab, because it would be pointless, go up and down the neck.
Personally I go about 6 hours a day.
But that's including writing and practicing stuff for my band.
My practice practice is about 4 hours a day.
What you want to do is use those ^^^ cromatics a lot, and like the first guy said, learn the modes. Then (this is a huge part of my practice) play different sequences in those modes. For example, take B Locrian, and incorporate a ladder sequence into it for 15 minutes. Like this.

A---------------------7---------7-8-------7-8-10-7-8-10------8-10--------10------------ etc
E-- 7-8-10-7-8-10---8-10---------10------------------------------------------------------

And then do the same descending.
Here's another good one.

And then descending:

Take lessons, if at all possible, and tell your instructor that you need some serious practice material, and then start hacking away at it.
Practice things you're going to apply to songs. Some people go crazy working up chromatic licks to huge speeds, but then end up doing nothing with them. Get yourself on a varied schedule with a break every hour or so. For me, that keeps me fresh and more focused.

Also, try writing out some goals for yourself, and getting a routine down to reach applicable goals. A lot of people who eventually go on to great things (not just guitar) do this.