The answer is: He shouldn't have been able to. No human without some degree of superhuman resistance should normally be expected to come away unscratched from a solid punch, or even a glancing one from someone as strong as Spider-Man is supposed to be. This is a medium translation error.
For this to translate effectively to the movies, without blowing the bank on CGI, they would have had to give the good doctor, the quickly glossed-over explanation, i.e. some kind of more complete body armor, skeletal enhancement or other handwavium to explain why a punch from Spider-Man didn't equal a month in traction and years of reconstructive plastic surgery.
No, it is never addressed and since the people who weren't fans didn't know Doc Ock's face wasn't reinforced, only millions of fan boys screamed out in theaters across the world and then fell silent.
TALE OF THE TAPE:
Spider-Man's superhuman strength varies depending on whose writing him. In most cases, it appears to range from 8-20 tons, with a bit of wiggle room for leverage, webbing assists and plot necessity. Granted, whenever Spider-Man fights most humans he must restrain his strength lest he harm someone by accident. This means he fights throttled back most of the time and has to be driven to use his full strength, and he only uses it if the target has been proven to be able to survive it. (See: Spider-Man vs. Firelord)
The Doctor's mechanical arms have great superhuman strength depending on what they're made of (titanium, adamantium, and later carbonadium) in the latter cases, allowing him to best Iron Man and hold his own against the Hulk. So their superhuman strength is more than enough to keep Spider-Man in check. Their durability does not, however, extend to the good doctor's face.
In early depictions, Doctor Octopus' arms were so fast and powerful, Spider-Man was barely a match for them.
- This means unless the doctor's face has some kind of enhancement, Spider-Man should make mincemeat out of the bones in the doctor's skull with any good blow. And this is where the medium translation error takes hold. No explanation is made for his increased durability.
In the comics, Spider-Man and Doc Ock sparred. A lot.
- And in those fights, Spider-Man is almost always considered the underdog. The mechanical arms of Otto Octavius are so fast, only Spider-Man's spider-sense, working overtime, keeps him from being speared or completely crushed by the mechanical arms superhuman strength.
Doctor Octopus rarely takes a body blow from Spider-Man due to the insane speed of the Doctor's mechanical arms. More than fast enough to keep up with Spider-Man's preternatural quickness, what is usually depicted is Spider-Man spends most of his time on defensive and if Spider-Man is just fast enough, Doctor Octopus' arms protect him by instinctively blocking at the last moment, protecting his face/body like a boxer.
This has made for some of Spider-Man's most challenging fights because, while the Doctor's body is relatively fragile, his arms weave an area of protection around him Spider-Man can't afford to get too close to, since if he gets grabbed by the Doctor's arms, they can rip him apart.
In contests between Doc Ock and Spidey, the two would almost appear perfectly matched, so much so, you'd tend to forget Doc Ock was a normal man in this fight. But if Spider-Man landed a body blow, the battle was usually over.
IN THE COMICS:
The eventual solution (which seemed to take almost five decades for anyone to consider) to explain how Doctor Octopus ever survived fights with Spider-Man in the first place, being a portly, middle-aged scientist, was he had some kind of low-level mutation going on giving him telekinesis and presumably the ability to not explode when Spider-Man punched him in his non-armored meaty sections. In the Ultimate Marvel comic universe, they gave Octopus an entire super-powered exoskeleton...
The Earth-616 comic writers did catch up, now that Doctor Octopus is firmly on Medicare at his age and decided the good doctor would eventually need to wear an exoskeletal harness to support his body from years of super-powered beatdowns taking their toll on him.
Doctor Octopus in his first appearance and Doctor Octopus before his demise in his exo-life support armor.
Doctor Octopus has begun wearing a full-body armor suit due to a crippling illness caused by the amount of punishment he has sustained over the years, made even worse by the fact that his ability to take damage is still at a human norm, even if he can deliver a superhuman level of punishment; he relies completely on his arms to prevent opponents with superhuman strength getting in close enough to damage his relatively unfit physical form even before his illness. To compensate, he has covered his entire body with his new suit, his normal arms are bound to his chest, and four additional tentacles have been added to his harness. He has also developed psychokinetic-telepathic control over an army of "Octobots" (small octopus-like drones).
In an ironic twist
When Peter Parker's body is apparently permanently hijacked by Doctor Octopus (you did know this, right?) Octavius learns first hand just how powerful Spider-Man is when he PUNCHES OFF THE JAW OF THE SCORPION...by accident.