Remove the entire cover (on a paperback you can leave the covers but remove the spine). Clamp the hole stack together in a vice, a press or with boards and clamps - whatever you have to your disposal. Important is to have all pages lined up and clamped firmly together. Then you have to get something called bookbinders size/paste. Not really shure whats that in english. Its a syntetic resin. You probably get it at artist supply stores. Apply the resin repeatetly to the bare pages where the spine used to be. Then you have to make yourself a new cover (You must be craetive here) and glue that to the stack of paper.
I have this information from my girlfriend who worked as a bookbinder.