I'm a 22 year old varsity athlete but once in a while I get a really sharp pain on my right side under my rib cage that stays for about 5-10 sec.

Pain when healthy. Hi i think this is normal or natural. You could be not keeping up with your rehydration taking in enough fluids or the electrolytes you sweat away when you are active. Your symptoms may very well just be a muscle spasm that will go away with good nutrition, hydration and stretching.
Stitch. This is common especially in athletes. A fold develops in your pleura which lines your chest cavities. Feels like a knife, worse when you breathe in. The deepest possible inflation of your lungs fixes it, and it self-cures in a short time. If it's accompanied by shortness of breath or something else that seems serious, get it seen.