The phrase is hyperbolic; it does not mean someone's head literally detaches. When I watched the movie, I laughed my head off, but of course, I kept my head!
Pro Tip 2/3
Informal
Used in casual settings; not appropriate for formal contexts like business meetings. At the family reunion, we laughed our heads off at Uncle Joe's stories.
Pro Tip 3/3
Emotional Intensity
Indicates strong emotions; use when expressing a deep reaction to something funny. His prank was so elaborate, we all laughed our heads off when it was revealed.