Is it true that PhD students need to work 10-12 hours a day every day to be productive? I hear a lot of people brag or complain about how many hours they have to work for their PhD. Is this the norm? And if so is this really a wise choice to make? Do students really 'work' during this period of time (as would be expected in a corporate office), or do many also spend their time goofing around?

I've read that it's only possible to do 4 hours of deeply creative work everyday. Since energy often depletes over the day, I've personally found that outside of a small number of hours in a day, the rest of my time is spent doing mechanical tasks or straining myself in vain to think about a problem.
The answer is no.

There are a lot of factors in play. With my work, a lot of it is creative so it is hard to say when I am working or not.

Do people expect students to work that many hours? Maybe, but it isn't healthy (and maybe not legal). 

Do people really work the entire time they are at work? Probably not. Your productivity certainly goes down the longer you work. Whether people goof around or not isn't specific to Academia and can happen anywhere (I don't find goofing around to be a negative thing). 

I too have read several studies about the limited number of hours that people have for mentally demanding tasks. In fact, I read a study about programmers that said they were lucky to get 1-2 hours of solid work done in a day. This info can help you organize your day so that you work on difficult tasks in the morning and then mechanical tasks in the afternoon. Also, studies have shown that taking breaks and going on walks can help improve your productivity.

There isn't a cookie cutter answer for everyone. It depends on yourself, the type of work, your advisor, and your coworkers.