I’d say it’s usually sort of condescending. Not so much, “damn, you’re an idiot.” but “aw, that’s cute. she’s too innocent/gullible/inexperienced/young to get it”
If someone said something went over my head, I’d generally be embarrassed, but not insulted. “yeah yeah, okay, silly me. now I know.”
On the other hand, though, if someone tells me it’s over my head before there’s any evidence that it is, I’d be insulted. If I asked a question and the response was “that’s over your head” I’d take that as an insult- it’s not a commentary on what I currently know or do not know (there’s no shame in not knowing something as long as I can ask the right questions and learn it.) as much as an assumption of what I’m capable of knowing or understanding.