Well there has been one incident that happened on British Airways Flight 5390, a BAC 1–11.
On this flight from England to Spain, the maintenance had used the wrong screws to fix the cockpit windshield, as you would see below:
At 17, 400 ft, the windshield blew off, sucking the captain out of the cockpit.
Amazingly, the co pilot was able to make an emergency landing in Southampton, with no loss of life and no injury. The only injury was the captain.
Now to answer your question: What would happen if you stuck your head out of the window during flight? First you would get sucked out, and like the captain, you would get bruises, frostbite, and shock, maybe even worse. He also got many fractures as well. The flight attendant who held him in got a dislocated shoulder as well as frostbite.