I'm getting a pulsing pain in my neck and head while doing cobra in yoga. Where is it coming from?

Pinched nerve? Possibly a pinched nerve, disk problem. Talk to your physician and also ask your yoga instructor on how to do the position differently. After accidents, i recommend yoga with the caveat that the instructor change positions to not put undue pressure on injured areas. If they don't know how to do that, find another instructor.