This is pretty common amongst friends. The person who calls "shotgun" has the privilege of riding in the front passenger seat (ie. the shotgun position).
If a group of friends are walking towards the driver's car, the first one to call shotgun gets to ride in front.
In your example, the person throws the keys to another person (="you're the driver") and calls "Shotgun!" (= "I'm in the front passenger seat."). If there were only two people, then this would be a little comical.