The medical term is a subungual hematoma, which simply means bleeding under the nail. This can occur from a single instance of trauma like dropping something on your toe, or from small, repetitive trauma like a too-small or too-big (so your foot slams back and forth) ski boot.
If this happens to you- do NOT wait to go in to a clinic, because the success rate in fixing this problem is much higher the earlier it is treated. The treatment procedure involves burning a tiny hole through the nail, which allows the trapped blood to drain. There is typically only a few drops, but the pain that small amount of blood causes underneath the nail (if not removed) is fairly intense.
As with so many medical problems, PREVENTION is key! Make sure your ski boots fit properly- don't cram your foot into a friend's boots- and be sure your socks are not bunched up. Using the newer thin ski socks, rather than old school super thick ones, also helps. (Don't worry, the new fabrics keep your toes warmer, despite what it might appear.) This painful injury should NOT occur if your shoes/boots fit correctly.
BOTTOM LINE: Make sure your ski boots and socks fit properly, and avoid getting skier's toe!
PS. In prior blog posts regarding this injury, people have commented about home remedies. While in experienced hands, the red-hot tip of a flame-sterilized paperclip may be used to swiftly burn a tiny hole through the nail, I would definitely NOT recommend trying this on your own. Among other challenges, people have been known to pass out from simply watching this procedure done on another person's toe...