The same as get your shit together. Basically means calm down, don't panic, or focus. Usually said if you are normally good at something, but aren't able to do it well because your mind is preoccupied with something else, or you're just tired.
Kevin: Get your head on straight Amit, my grandmother could have gotten that rebound.
Amit: Sorry man, I'm still tired from that party last night.
This is something a friend says to you while at school or work when they are having a long day if someone asks you this and you say no you should throw your self into a hole and stay their give this friend lots of head scratch’s and stroke them like a cat