The ball ricocheted off Cobb's head all the way back to the home-plate area, so it was by no means a glancing blow. It was ugly.
Here's video of the play. Remember, a pitcher gets hit in the head by a hard line drive. If you don't want to see that, don't click on the play button:
The Rays said Cobb remained conscious all the way to the hospital and has only a mild concussion, which is pretty surprising given how hard it hit him.
Note just how hard it was hit, via Baseball Tonight's Jonah Keri:
Cobb immediately fell to the ground and was nearly motionless, save for some leg movement. Doctors and athletic trainers immediately signaled for the stretcher and Cobb was taken to the hospital.
Considering how violent the play looked, Cobb is mighty fortunate to have escaped with a mild concussion. He will remain in the hospital overnight for observation, but as things currently stand, it appears it's pretty good news.