It's pretty freaky when you see it happen. Like these hunters did (warning: NSFW language - the hunters let loose some "excited utterances" watching this owl do its thing) early in this clip:
Owls need to be able to do this, because - here's something else you might not know about owls - their eyes are fixed in place. Owls cannot move their eyes around in their eye sockets; they have to turn their whole head to see to the side. (Owls can also tilt their heads 180 degrees on the vertical, which makes for a very maneuverable noggin.)
But how do owls do this? They must have a skeletal design that allows it, obviously, but even if human skeletons allowed us to do the same thing we'd probably die if it we tried it. Because the arteries carrying blood to our brains would be restricted, and blood flow cut off, if we turned our heads 270 degrees.
Owls' skeletons allow them to spin their heads in this manner, and their arterial system also accommodates head-spinning.
The specific biological design that allows owls to rotate their heads was, until recently, unknown. But scientists finally figured it out. This video from SciFri explains the owls' tricks, and it also includes a few more examples of the owl's head-spinning in action: